L L4D2node

CUtlRBTree<CUtlMap<CHandle<CBaseEntity>,CLagCompensationManager::EntityLagData*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CHandle<CBaseEntity>,CLagCompensationManager::EntityLagData*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CHandle<CBaseEntity>,CLagCompensationManager::EntityLagData*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::Insert

0x007d56c0 · 485 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapI7CHandleI11CBaseEntityEPN23CLagCompensationManager13EntityLagDataEtE6Node_tEtNS7_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS8_tEtEE6InsertERKS8_

Decompiled

undefined (2 params)

/* CUtlRBTree<CUtlMap<CHandle<CBaseEntity>, CLagCompensationManager::EntityLagData*, unsigned
   short>::Node_t, unsigned short, CUtlMap<CHandle<CBaseEntity>,
   CLagCompensationManager::EntityLagData*, unsigned short>::CKeyLess,
   CUtlMemory<UtlRBTreeNode_t<CUtlMap<CHandle<CBaseEntity>, CLagCompensationManager::EntityLagData*,
   unsigned short>::Node_t, unsigned short>, unsigned short> >::Insert(CUtlMap<CHandle<CBaseEntity>,
   CLagCompensationManager::EntityLagData*, unsigned short>::Node_t const&) */

ushort __thiscall
CUtlRBTree<CUtlMap<CHandle<CBaseEntity>,CLagCompensationManager::EntityLagData*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CHandle<CBaseEntity>,CLagCompensationManager::EntityLagData*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CHandle<CBaseEntity>,CLagCompensationManager::EntityLagData*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Insert(CUtlRBTree<CUtlMap<CHandle<CBaseEntity>,CLagCompensationManager::EntityLagData*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CHandle<CBaseEntity>,CLagCompensationManager::EntityLagData*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CHandle<CBaseEntity>,CLagCompensationManager::EntityLagData*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
         *this,Node_t *param_1)

{
  ushort uVar1;
  bool bVar2;
  char cVar3;
  int iVar4;
  undefined2 *puVar5;
  int iVar6;
  ushort uVar7;
  int local_24;
  ushort local_1e;
  
  uVar1 = *(ushort *)(this + 0x10);
  if (*(ushort *)(this + 0x10) == 0xffff) {
    local_1e = NewNode(this);
    local_24 = (uint)local_1e * 0x10;
    puVar5 = (undefined2 *)(local_24 + *(int *)(this + 4));
    puVar5[2] = 0xffff;
    puVar5[1] = 0xffff;
    *puVar5 = 0xffff;
    puVar5[3] = 0;
  }
  else {
    do {
      uVar7 = uVar1;
      iVar6 = (uint)uVar7 * 0x10;
      cVar3 = (**(code **)this)(param_1,*(int *)(this + 4) + iVar6 + 8);
      if (cVar3 == '\0') {
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f4ee72 = 0xffff;
          DAT_00f4ee74 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        bVar2 = false;
        uVar1 = *(ushort *)(*(int *)(this + 4) + 2 + iVar6);
      }
      else {
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f4ee72 = 0xffff;
          DAT_00f4ee74 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        bVar2 = true;
        uVar1 = *(ushort *)(*(int *)(this + 4) + iVar6);
      }
    } while (uVar1 != 0xffff);
    local_1e = NewNode(this);
    local_24 = (uint)local_1e * 0x10;
    puVar5 = (undefined2 *)(local_24 + *(int *)(this + 4));
    puVar5[1] = 0xffff;
    *puVar5 = 0xffff;
    puVar5[2] = uVar7;
    puVar5[3] = 0;
    if (uVar7 != 0xffff) {
      if (bVar2) {
        *(ushort *)(*(int *)(this + 4) + iVar6) = local_1e;
      }
      else {
        *(ushort *)(*(int *)(this + 4) + 2 + iVar6) = local_1e;
      }
      goto LAB_007d5795;
    }
  }
  *(ushort *)(this + 0x10) = local_1e;
LAB_007d5795:
  InsertRebalance(this,local_1e);
  *(short *)(this + 0x12) = *(short *)(this + 0x12) + 1;
  local_24 = local_24 + *(int *)(this + 4);
  if (local_24 != -8) {
    *(undefined4 *)(local_24 + 8) = *(undefined4 *)param_1;
    *(undefined4 *)(local_24 + 0xc) = *(undefined4 *)(param_1 + 4);
  }
  return local_1e;
}

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)