L L4D2node

CUtlRBTree<AI_CriteriaSet::CritEntry_t,short,bool(*)(AI_CriteriaSet::CritEntry_t_const&,AI_CriteriaSet::CritEntry_t_const&),CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short>>::NewNode

0x005ab590 · 293 bytes · __thiscall

_ZN10CUtlRBTreeIN14AI_CriteriaSet11CritEntry_tEsPFbRKS1_S3_E10CUtlMemoryI15UtlRBTreeNode_tIS1_sEsEE7NewNodeEv

Decompiled

undefined (1 param)

/* CUtlRBTree<AI_CriteriaSet::CritEntry_t, short, bool (*)(AI_CriteriaSet::CritEntry_t const&,
   AI_CriteriaSet::CritEntry_t const&), CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,
   short>, short> >::NewNode() */

void __thiscall
CUtlRBTree<AI_CriteriaSet::CritEntry_t,short,bool(*)(AI_CriteriaSet::CritEntry_t_const&,AI_CriteriaSet::CritEntry_t_const&),CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short>>
::NewNode(CUtlRBTree<AI_CriteriaSet::CritEntry_t,short,bool(*)(AI_CriteriaSet::CritEntry_t_const&,AI_CriteriaSet::CritEntry_t_const&),CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short>>
          *this)

{
  ushort uVar1;
  short sVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  
  if (*(short *)(this + 0x14) != -1) {
    iVar5 = *(int *)(this + 4);
    iVar3 = *(short *)(this + 0x14) * 0x50 + iVar5;
    *(undefined2 *)(this + 0x14) = *(undefined2 *)(iVar3 + 2);
    goto LAB_005ab5bb;
  }
  uVar1 = *(ushort *)(this + 0x16);
  iVar3 = *(int *)(this + 8);
  if (((short)uVar1 < 0) || (iVar3 <= (short)uVar1)) {
    iVar4 = -(uint)(iVar3 < 1);
    iVar5 = iVar4;
LAB_005ab605:
    sVar2 = (short)iVar4;
    if ((iVar5 == -1) || (*(int *)(this + 8) <= iVar5)) goto LAB_005ab640;
    iVar3 = sVar2 * 0x50;
  }
  else {
    iVar4 = uVar1 + 1;
    iVar5 = (int)(short)iVar4;
    if ((-1 < iVar5) && (iVar5 < iVar3)) goto LAB_005ab605;
LAB_005ab640:
    CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short>::Grow
              ((CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short> *)(this + 4),1)
    ;
    uVar1 = *(ushort *)(this + 0x16);
    iVar3 = *(int *)(this + 8);
    if (((short)uVar1 < 0) || (iVar3 <= (short)uVar1)) {
      iVar4 = -(uint)(iVar3 < 1);
      iVar3 = (uint)(iVar3 < 1) * -0x50;
      iVar5 = iVar4;
LAB_005ab69f:
      sVar2 = (short)iVar4;
      if ((iVar5 != -1) && (iVar5 < *(int *)(this + 8))) goto LAB_005ab61a;
    }
    else {
      iVar4 = uVar1 + 1;
      iVar5 = (int)(short)iVar4;
      if ((-1 < iVar5) && (iVar5 < iVar3)) {
        iVar3 = iVar5 * 0x50;
        goto LAB_005ab69f;
      }
      iVar3 = -0x50;
      sVar2 = -1;
    }
    Error("CUtlRBTree overflow!\n");
  }
LAB_005ab61a:
  iVar5 = *(int *)(this + 4);
  *(short *)(this + 0x16) = sVar2;
  iVar3 = iVar5 + iVar3;
LAB_005ab5bb:
  if (iVar3 != -8) {
    *(undefined4 *)(iVar3 + 0x4c) = 0;
    *(undefined2 *)(iVar3 + 8) = 0xffff;
    *(undefined1 *)(iVar3 + 10) = 0;
    iVar5 = *(int *)(this + 4);
  }
  *(int *)(this + 0x18) = iVar5;
  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)