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>>::Unlink

0x007d46c0 · 1399 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapI7CHandleI11CBaseEntityEPN23CLagCompensationManager13EntityLagDataEtE6Node_tEtNS7_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS8_tEtEE6UnlinkEt

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> >::Unlink(unsigned short) */

void __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>>
::Unlink(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,ushort param_1)

{
  ushort uVar1;
  short sVar2;
  char cVar3;
  int iVar4;
  short *psVar5;
  ushort *puVar6;
  undefined2 *puVar7;
  int iVar8;
  ushort local_22;
  
  if (param_1 != 0xffff) {
    if ((Links(unsigned_short)::s_Sentinel == '\0') &&
       (iVar8 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar8 != 0)) {
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00f4ee72 = 0xffff;
      DAT_00f4ee74 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    iVar8 = (uint)param_1 * 0x10;
    uVar1 = param_1;
    cVar3 = Links(unsigned_short)::s_Sentinel;
    if ((*(short *)(*(int *)(this + 4) + iVar8) != -1) &&
       (iVar4 = Links(this,param_1), cVar3 = Links(unsigned_short)::s_Sentinel,
       *(short *)(iVar4 + 2) != -1)) {
      iVar8 = Links(this,param_1);
      uVar1 = *(ushort *)(iVar8 + 2);
      cVar3 = Links(unsigned_short)::s_Sentinel;
      while( true ) {
        if ((cVar3 == '\0') &&
           (iVar8 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
           cVar3 = Links(unsigned_short)::s_Sentinel, iVar8 != 0)) {
          Links(unsigned_short)::s_Sentinel = -1;
          DAT_00f4ee72 = 0xffff;
          DAT_00f4ee74 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          cVar3 = Links(unsigned_short)::s_Sentinel;
        }
        sVar2 = Links(unsigned_short)::s_Sentinel;
        if (uVar1 != 0xffff) {
          sVar2 = *(short *)((uint)uVar1 * 0x10 + *(int *)(this + 4));
        }
        if (sVar2 == -1) break;
        if (cVar3 == '\0') {
          iVar8 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar8 != 0) {
            Links(unsigned_short)::s_Sentinel = -1;
            DAT_00f4ee72 = 0xffff;
            DAT_00f4ee74 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          cVar3 = Links(unsigned_short)::s_Sentinel;
          if (uVar1 == 0xffff) goto LAB_007d499d;
LAB_007d4767:
          puVar6 = (ushort *)((uint)uVar1 * 0x10 + *(int *)(this + 4));
        }
        else {
          if (uVar1 != 0xffff) goto LAB_007d4767;
LAB_007d499d:
          puVar6 = (ushort *)&Links(unsigned_short)::s_Sentinel;
        }
        uVar1 = *puVar6;
      }
      iVar8 = (uint)uVar1 << 4;
    }
    if ((cVar3 == '\0') &&
       (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00f4ee72 = 0xffff;
      DAT_00f4ee74 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    if (uVar1 == 0xffff) {
      psVar5 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      psVar5 = (short *)(*(int *)(this + 4) + iVar8);
    }
    if (*psVar5 == -1) {
      iVar4 = Links(this,uVar1);
      local_22 = *(ushort *)(iVar4 + 2);
    }
    else {
      if ((Links(unsigned_short)::s_Sentinel == '\0') &&
         (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
        Links(unsigned_short)::s_Sentinel = -1;
        DAT_00f4ee72 = 0xffff;
        DAT_00f4ee74 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (uVar1 == 0xffff) {
        puVar6 = (ushort *)&Links(unsigned_short)::s_Sentinel;
      }
      else {
        puVar6 = (ushort *)(*(int *)(this + 4) + iVar8);
      }
      local_22 = *puVar6;
    }
    if (local_22 != 0xffff) {
      iVar4 = Links(this,uVar1);
      *(undefined2 *)((uint)local_22 * 0x10 + *(int *)(this + 4) + 4) = *(undefined2 *)(iVar4 + 4);
    }
    if (uVar1 == *(ushort *)(this + 0x10)) {
      *(ushort *)(this + 0x10) = local_22;
    }
    else {
      iVar4 = Links(this,uVar1);
      puVar6 = (ushort *)Links(this,*(ushort *)(iVar4 + 4));
      if (uVar1 == *puVar6) {
        iVar4 = Links(this,uVar1);
        *(ushort *)((uint)*(ushort *)(iVar4 + 4) * 0x10 + *(int *)(this + 4)) = local_22;
      }
      else {
        iVar4 = Links(this,uVar1);
        *(ushort *)((uint)*(ushort *)(iVar4 + 4) * 0x10 + *(int *)(this + 4) + 2) = local_22;
      }
    }
    if ((Links(unsigned_short)::s_Sentinel == '\0') &&
       (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00f4ee72 = 0xffff;
      DAT_00f4ee74 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    sVar2 = DAT_00f4ee76;
    if ((uVar1 == 0xffff) || (sVar2 = *(short *)(*(int *)(this + 4) + 6 + iVar8), uVar1 != param_1))
    {
      iVar4 = Links(this,param_1);
      *(undefined2 *)(*(int *)(this + 4) + 4 + iVar8) = *(undefined2 *)(iVar4 + 4);
      iVar4 = Links(this,param_1);
      *(undefined2 *)(*(int *)(this + 4) + 2 + iVar8) = *(undefined2 *)(iVar4 + 2);
      puVar7 = (undefined2 *)Links(this,param_1);
      *(undefined2 *)(*(int *)(this + 4) + iVar8) = *puVar7;
      if (param_1 == *(ushort *)(this + 0x10)) {
        *(ushort *)(this + 0x10) = uVar1;
      }
      else {
        iVar4 = Links(this,param_1);
        puVar6 = (ushort *)Links(this,*(ushort *)(iVar4 + 4));
        if (param_1 == *puVar6) {
          iVar4 = Links(this,param_1);
          *(ushort *)((uint)*(ushort *)(iVar4 + 4) * 0x10 + *(int *)(this + 4)) = uVar1;
        }
        else {
          iVar4 = Links(this,param_1);
          *(ushort *)((uint)*(ushort *)(iVar4 + 4) * 0x10 + *(int *)(this + 4) + 2) = uVar1;
        }
      }
      psVar5 = (short *)Links(this,uVar1);
      if (*psVar5 != -1) {
        puVar6 = (ushort *)Links(this,uVar1);
        *(ushort *)((uint)*puVar6 * 0x10 + *(int *)(this + 4) + 4) = uVar1;
      }
      iVar4 = Links(this,uVar1);
      if (*(short *)(iVar4 + 2) != -1) {
        iVar4 = Links(this,uVar1);
        *(ushort *)((uint)*(ushort *)(iVar4 + 2) * 0x10 + *(int *)(this + 4) + 4) = uVar1;
      }
      iVar4 = Links(this,param_1);
      *(undefined2 *)(*(int *)(this + 4) + 6 + iVar8) = *(undefined2 *)(iVar4 + 6);
    }
    if ((local_22 != 0xffff) && (sVar2 == 1)) {
      RemoveRebalance(this,local_22);
      return;
    }
  }
  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)