L L4D2node

CTerrorPlayer::~CTerrorPlayer

0x009d1580 · 498 bytes · __thiscall

_ZN13CTerrorPlayerD1Ev

Decompiled

undefined (1 param)

/* CTerrorPlayer::~CTerrorPlayer() */

void __thiscall CTerrorPlayer::~CTerrorPlayer(CTerrorPlayer *this)

{
  int *piVar1;
  ushort uVar2;
  
  *(undefined ***)this = &PTR__CTerrorPlayer_00d1a6e8;
  uVar2 = DAT_01017334;
  *(undefined **)(this + 0x2364) = &DAT_00d1b024;
  do {
    if (uVar2 == 0xffff) {
LAB_009d15fc:
      KeyValues::deleteThis();
      operator_delete(*(void **)(this + 0x3110));
      if (*(int *)(this + 0x2e20) != 0) {
        KeyValues::deleteThis();
        *(undefined4 *)(this + 0x2e20) = 0;
      }
      g_nTerrorPlayers = g_nTerrorPlayers + -1;
      Music::~Music((Music *)(this + 0x3ab4));
      *(undefined4 *)(this + 0x3aa4) = 0;
      CUtlMemory<CTerrorPlayer::InfectedDamageEvent,int>::Purge
                ((CUtlMemory<CTerrorPlayer::InfectedDamageEvent,int> *)(this + 15000));
      *(undefined4 *)(this + 0x3aa8) = *(undefined4 *)(this + 15000);
      CUtlMemory<CTerrorPlayer::InfectedDamageEvent,int>::Purge
                ((CUtlMemory<CTerrorPlayer::InfectedDamageEvent,int> *)(this + 15000));
      *(undefined4 *)(this + 0x338c) = 0;
      CUtlMemory<float,int>::Purge((CUtlMemory<float,int> *)(this + 0x3380));
      *(undefined4 *)(this + 0x3390) = *(undefined4 *)(this + 0x3380);
      CUtlMemory<float,int>::Purge((CUtlMemory<float,int> *)(this + 0x3380));
      *(undefined4 *)(this + 0x3140) = 0;
      CUtlMemory<CHandle<CBaseCombatCharacter>,int>::Purge
                ((CUtlMemory<CHandle<CBaseCombatCharacter>,int> *)(this + 0x3134));
      *(undefined4 *)(this + 0x3144) = *(undefined4 *)(this + 0x3134);
      CUtlMemory<CHandle<CBaseCombatCharacter>,int>::Purge
                ((CUtlMemory<CHandle<CBaseCombatCharacter>,int> *)(this + 0x3134));
      *(undefined4 *)(this + 0x30f4) = 0;
      CUtlMemory<CNavArea*,int>::Purge((CUtlMemory<CNavArea*,int> *)(this + 0x30e8));
      *(undefined4 *)(this + 0x30f8) = *(undefined4 *)(this + 0x30e8);
      CUtlMemory<CNavArea*,int>::Purge((CUtlMemory<CNavArea*,int> *)(this + 0x30e8));
      Intensity::~Intensity((Intensity *)(this + 12000));
      CUtlLinkedList<Vector,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short>>
      ::RemoveAll((CUtlLinkedList<Vector,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short>>
                   *)(this + 0x2d6c));
      CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short>::Purge
                ((CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short> *)
                 (this + 0x2d6c));
      *(undefined4 *)(this + 0x2b54) = 0;
      CUtlMemory<CTerrorPlayer::TrackedSoundType,int>::Purge
                ((CUtlMemory<CTerrorPlayer::TrackedSoundType,int> *)(this + 0x2b48));
      *(undefined4 *)(this + 0x2b58) = *(undefined4 *)(this + 0x2b48);
      CUtlMemory<CTerrorPlayer::TrackedSoundType,int>::Purge
                ((CUtlMemory<CTerrorPlayer::TrackedSoundType,int> *)(this + 0x2b48));
      *(undefined ***)(this + 0x2b24) = &PTR___cxa_pure_virtual_00d1a5b0;
      if (((byte)this[0x2b28] & 1) != 0) {
        SteamAPI_UnregisterCallback(this + 0x2b24);
      }
      CCSPlayer::~CCSPlayer((CCSPlayer *)this);
      return;
    }
    piVar1 = (int *)(g_TerrorPlayerPostThinkQueue + (uint)uVar2 * 8);
    if (this == (CTerrorPlayer *)*piVar1) {
      CUtlLinkedList<CTerrorPlayer*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CTerrorPlayer*,unsigned_short>,unsigned_short>>
      ::Unlink((CUtlLinkedList<CTerrorPlayer*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CTerrorPlayer*,unsigned_short>,unsigned_short>>
                *)&g_TerrorPlayerPostThinkQueue,uVar2);
      *(ushort *)(g_TerrorPlayerPostThinkQueue + 6 + (uint)uVar2 * 8) = DAT_01017338;
      DAT_01017338 = uVar2;
      goto LAB_009d15fc;
    }
    uVar2 = *(ushort *)((int)piVar1 + 6);
  } while( true );
}

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)