L L4D2node

CBaseButton::ButtonSpark

0x00634700 · 228 bytes · __thiscall

_ZN11CBaseButton11ButtonSparkEv

Decompiled

undefined (1 param)

/* CBaseButton::ButtonSpark() */

void __thiscall CBaseButton::ButtonSpark(CBaseButton *this)

{
  float fVar1;
  Vector *pVVar2;
  longdouble lVar3;
  undefined4 uVar4;
  undefined4 uVar5;
  undefined4 uVar6;
  undefined1 local_14 [12];
  
  uVar6 = 0;
  uVar5 = 0;
  uVar4 = 0;
  CBaseEntity::ThinkSet((_func_void *)local_14,(float)this,(char *)ButtonSpark);
  fVar1 = *(float *)(gpGlobals + 0xc);
  lVar3 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0,0x3fc00000,uVar4,uVar5,uVar6);
  CBaseEntity::SetNextThink((CBaseEntity *)this,fVar1 + 0.1 + (float)lVar3,(char *)0x0);
  pVVar2 = (Vector *)(**(code **)(*(int *)this + 0x288))(this);
  DoSpark((CBaseEntity *)this,pVVar2,1,1,true,(Vector *)&vec3_origin);
  return;
}

SourceMod gamedata

paste into addons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)

Just a Signatures{} block, ready to drop into a gamedata file. Wire it up in your plugin however you like - SDKCall, DHooks, raw memory ops, or anything else.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)