L L4D2node

CTerrorPlayer::Extinguish

0x009ca3c0 · 312 bytes · __thiscall

_ZN13CTerrorPlayer10ExtinguishEv

Decompiled

undefined (1 param)

/* CTerrorPlayer::Extinguish() */

void __thiscall CTerrorPlayer::Extinguish(CTerrorPlayer *this)

{
  uint uVar1;
  CBaseEntity *pCVar2;
  undefined *puVar3;
  int iVar4;
  int iVar5;
  int local_30 [8];
  
  uVar1 = *(uint *)(this + 0x150);
  CBaseEntity::RemoveFlag((CBaseEntity *)this,0x8000000);
  if ((uVar1 & 0x8000000) != 0) {
    local_30[0] = 0;
    local_30[1] = 0;
    local_30[2] = 0;
    local_30[3] = 0;
    local_30[4] = 0;
                    /* try { // try from 009ca45d to 009ca4ad has its CatchHandler @ 009ca500 */
    GetAllChildren((CBaseEntity *)this,(CUtlVector *)local_30);
    if ((local_30[3] != 0) && (iVar4 = local_30[3] + -1, -1 < iVar4)) {
      iVar5 = iVar4 * 4;
      do {
        if (*(int *)(local_30[0] + iVar5) != 0) {
          pCVar2 = (CBaseEntity *)
                   __dynamic_cast(*(int *)(local_30[0] + iVar5),&CBaseEntity::typeinfo,
                                  &CEntityFlame::typeinfo,0);
          if (pCVar2 != (CBaseEntity *)0x0) {
            UTIL_Remove(pCVar2);
          }
        }
        iVar4 = iVar4 + -1;
        iVar5 = iVar5 + -4;
      } while (iVar4 != -1);
    }
    local_30[3] = 0;
    CUtlMemory<CBaseEntity*,int>::Purge((CUtlMemory<CBaseEntity*,int> *)local_30);
    local_30[4] = local_30[0];
    CUtlMemory<CBaseEntity*,int>::Purge((CUtlMemory<CBaseEntity*,int> *)local_30);
  }
  uVar1 = *(uint *)(this + 0x224);
  if ((((uVar1 != 0xffffffff) &&
       (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) &&
     (*(CBaseEntity **)(puVar3 + 4) != (CBaseEntity *)0x0)) {
    UTIL_Remove(*(CBaseEntity **)(puVar3 + 4));
  }
  *(undefined4 *)(this + 0x32b0) = 0xffffffff;
  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)