L L4D2node

CTerrorPlayer::ResetLightingOrigin

0x009a9ad0 · 128 bytes · __thiscall

_ZN13CTerrorPlayer19ResetLightingOriginEv

Decompiled

undefined (1 param)

/* CTerrorPlayer::ResetLightingOrigin() */

void __thiscall CTerrorPlayer::ResetLightingOrigin(CTerrorPlayer *this)

{
  uint uVar1;
  CBaseEntity *this_00;
  char cVar2;
  undefined *puVar3;
  
  uVar1 = *(uint *)(this + 0x518);
  if ((((uVar1 != 0xffffffff) &&
       (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) &&
     (this_00 = *(CBaseEntity **)(puVar3 + 4), this_00 != (CBaseEntity *)0x0)) {
    if (*(char **)(this_00 + 0x7c) != "info_hang_lighting") {
      cVar2 = CBaseEntity::ClassMatchesComplex(this_00,"info_hang_lighting");
      if (cVar2 == '\0') goto LAB_009a9b08;
    }
    UTIL_Remove(this_00);
  }
LAB_009a9b08:
  (**(code **)(*(int *)this + 0x3a0))(this,0);
  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)