L L4D2node

CPhysSaveRestoreBlockHandler::OnEntityDeleted

0x00486df0 · 175 bytes · __thiscall

_ZN28CPhysSaveRestoreBlockHandler15OnEntityDeletedEP11CBaseEntity

Decompiled

undefined (2 params)

/* CPhysSaveRestoreBlockHandler::OnEntityDeleted(CBaseEntity*) */

void __thiscall
CPhysSaveRestoreBlockHandler::OnEntityDeleted
          (CPhysSaveRestoreBlockHandler *this,CBaseEntity *param_1)

{
  CUtlMemory<CPhysSaveRestoreBlockHandler::QueuedItem_t,int> *this_00;
  ushort uVar1;
  int iVar2;
  CBaseEntity *local_24 [5];
  
  local_24[0] = param_1;
  uVar1 = CUtlRBTree<CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
          ::Find((CUtlRBTree<CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                  *)(this + 0x24),(Node_t *)local_24);
  if (uVar1 != 0xffff) {
    iVar2 = (uint)uVar1 * 0x10;
    this_00 = *(CUtlMemory<CPhysSaveRestoreBlockHandler::QueuedItem_t,int> **)
               (*(int *)(this + 0x28) + 0xc + iVar2);
    if (this_00 != (CUtlMemory<CPhysSaveRestoreBlockHandler::QueuedItem_t,int> *)0x0) {
      *(undefined4 *)(this_00 + 0xc) = 0;
      CUtlMemory<CPhysSaveRestoreBlockHandler::QueuedItem_t,int>::Purge(this_00);
      *(undefined4 *)(this_00 + 0x10) = *(undefined4 *)this_00;
      CUtlMemory<CPhysSaveRestoreBlockHandler::QueuedItem_t,int>::Purge(this_00);
      operator_delete(this_00);
    }
    CUtlRBTree<CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
    ::Unlink((CUtlRBTree<CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
              *)(this + 0x24),uVar1);
    *(ushort *)(*(int *)(this + 0x28) + iVar2) = uVar1;
    *(undefined2 *)(*(int *)(this + 0x28) + 2 + iVar2) = *(undefined2 *)(this + 0x38);
    *(short *)(this + 0x36) = *(short *)(this + 0x36) + -1;
    *(ushort *)(this + 0x38) = uVar1;
  }
  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)