L L4D2node

CDynamicLight::DynamicLightThink

0x0066a5f0 · 252 bytes · __thiscall

_ZN13CDynamicLight17DynamicLightThinkEv

Decompiled

undefined (1 param)

/* CDynamicLight::DynamicLightThink() */

void __thiscall CDynamicLight::DynamicLightThink(CDynamicLight *this)

{
  CBaseEntity CVar1;
  CBaseEntity *this_00;
  float local_24;
  float local_20;
  float local_1c;
  QAngle local_18 [12];
  
  if (*(int *)(this + 0xf8) != 0) {
    this_00 = (CBaseEntity *)CBaseEntity::GetNextTarget((CBaseEntity *)this);
    if (this_00 != (CBaseEntity *)0x0) {
      if (((byte)this[0x14d] & 8) == 0) {
        CVar1 = this_00[0x14d];
      }
      else {
        CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
        CVar1 = this_00[0x14d];
      }
      if (((byte)CVar1 & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition(this_00);
      }
      local_24 = *(float *)(this_00 + 0x2e0) - *(float *)(this + 0x2e0);
      local_20 = *(float *)(this_00 + 0x2e4) - *(float *)(this + 0x2e4);
      local_1c = *(float *)(this_00 + 0x2e8) - *(float *)(this + 0x2e8);
      VectorAngles((Vector *)&local_24,local_18);
      CBaseEntity::SetAbsAngles((CBaseEntity *)this,local_18);
    }
    CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 0.1,(char *)0x0);
  }
  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)