L L4D2node

CHLTVDirector::RemoveEventsFromHistory

0x006dbd00 · 223 bytes · __thiscall

_ZN13CHLTVDirector23RemoveEventsFromHistoryEi

Decompiled

undefined (2 params)

/* CHLTVDirector::RemoveEventsFromHistory(int) */

void __thiscall CHLTVDirector::RemoveEventsFromHistory(CHLTVDirector *this,int param_1)

{
  CUtlRBTree<CGameEvent,unsigned_short,bool(*)(CGameEvent_const&,CGameEvent_const&),CUtlMemory<UtlRBTreeNode_t<CGameEvent,unsigned_short>,unsigned_short>>
  *this_00;
  uint uVar1;
  int iVar2;
  ushort uVar3;
  
  this_00 = (CUtlRBTree<CGameEvent,unsigned_short,bool(*)(CGameEvent_const&,CGameEvent_const&),CUtlMemory<UtlRBTreeNode_t<CGameEvent,unsigned_short>,unsigned_short>>
             *)(this + 0x1d0);
  uVar1 = CUtlRBTree<CGameEvent,unsigned_short,bool(*)(CGameEvent_const&,CGameEvent_const&),CUtlMemory<UtlRBTreeNode_t<CGameEvent,unsigned_short>,unsigned_short>>
          ::FirstInorder(this_00);
  do {
    uVar1 = uVar1 & 0xffff;
    if (uVar1 == 0xffff) {
      return;
    }
    while( true ) {
      iVar2 = *(int *)(this + 0x1d4) + uVar1 * 0x14;
      uVar3 = (ushort)uVar1;
      if ((*(int *)(iVar2 + 8) < param_1) || (param_1 == -1)) break;
      uVar1 = CUtlRBTree<CGameEvent,unsigned_short,bool(*)(CGameEvent_const&,CGameEvent_const&),CUtlMemory<UtlRBTreeNode_t<CGameEvent,unsigned_short>,unsigned_short>>
              ::NextInorder(this_00,uVar3);
      uVar1 = uVar1 & 0xffff;
      if (uVar1 == 0xffff) {
        return;
      }
    }
    (**(code **)(*gameeventmanager + 0x2c))(gameeventmanager,*(undefined4 *)(iVar2 + 0x10));
    *(undefined4 *)(iVar2 + 0x10) = 0;
    CUtlRBTree<CGameEvent,unsigned_short,bool(*)(CGameEvent_const&,CGameEvent_const&),CUtlMemory<UtlRBTreeNode_t<CGameEvent,unsigned_short>,unsigned_short>>
    ::Unlink(this_00,uVar3);
    *(ushort *)(*(int *)(this + 0x1d4) + uVar1 * 0x14) = uVar3;
    *(undefined2 *)(*(int *)(this + 0x1d4) + 2 + uVar1 * 0x14) = *(undefined2 *)(this + 0x1e4);
    *(short *)(this + 0x1e2) = *(short *)(this + 0x1e2) + -1;
    *(ushort *)(this + 0x1e4) = uVar3;
    uVar1 = CUtlRBTree<CGameEvent,unsigned_short,bool(*)(CGameEvent_const&,CGameEvent_const&),CUtlMemory<UtlRBTreeNode_t<CGameEvent,unsigned_short>,unsigned_short>>
            ::FirstInorder(this_00);
  } 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)