L L4D2node

CHLTVDirector::FindFirstEvent

0x006db260 · 101 bytes · __thiscall

_ZN13CHLTVDirector14FindFirstEventEi

Decompiled

undefined (2 params)

/* CHLTVDirector::FindFirstEvent(int) */

uint __thiscall CHLTVDirector::FindFirstEvent(CHLTVDirector *this,int param_1)

{
  uint uVar1;
  ushort uVar2;
  
  uVar2 = CUtlRBTree<CGameEvent,unsigned_short,bool(*)(CGameEvent_const&,CGameEvent_const&),CUtlMemory<UtlRBTreeNode_t<CGameEvent,unsigned_short>,unsigned_short>>
          ::FirstInorder((CUtlRBTree<CGameEvent,unsigned_short,bool(*)(CGameEvent_const&,CGameEvent_const&),CUtlMemory<UtlRBTreeNode_t<CGameEvent,unsigned_short>,unsigned_short>>
                          *)(this + 0x1d0));
  while( true ) {
    uVar1 = (uint)uVar2;
    if (uVar1 == 0xffff) {
      return 0xffff;
    }
    if (param_1 <= *(int *)(*(int *)(this + 0x1d4) + uVar1 * 0x14 + 8)) break;
    uVar2 = CUtlRBTree<CGameEvent,unsigned_short,bool(*)(CGameEvent_const&,CGameEvent_const&),CUtlMemory<UtlRBTreeNode_t<CGameEvent,unsigned_short>,unsigned_short>>
            ::NextInorder((CUtlRBTree<CGameEvent,unsigned_short,bool(*)(CGameEvent_const&,CGameEvent_const&),CUtlMemory<UtlRBTreeNode_t<CGameEvent,unsigned_short>,unsigned_short>>
                           *)(this + 0x1d0),uVar2);
  }
  return uVar1;
}

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)