L L4D2node

CUtlLinkedList<unsigned_short,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<unsigned_short,unsigned_short>,unsigned_short>>::Unlink

0x000bc8e0 · 133 bytes · __thiscall

_ZN14CUtlLinkedListIttLb1Et10CUtlMemoryI19UtlLinkedListElem_tIttEtEE6UnlinkEt

Decompiled

undefined (2 params)

/* CUtlLinkedList<unsigned short, unsigned short, true, unsigned short,
   CUtlMemory<UtlLinkedListElem_t<unsigned short, unsigned short>, unsigned short>
   >::Unlink(unsigned short) */

void __thiscall
CUtlLinkedList<unsigned_short,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<unsigned_short,unsigned_short>,unsigned_short>>
::Unlink(CUtlLinkedList<unsigned_short,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<unsigned_short,unsigned_short>,unsigned_short>>
         *this,ushort param_1)

{
  int iVar1;
  ushort uVar2;
  
  if (*(int *)(this + 4) <= (int)(uint)param_1) {
    return;
  }
  if (param_1 <= *(ushort *)(this + 0x16)) {
    iVar1 = *(int *)this + (uint)param_1 * 6;
    uVar2 = *(ushort *)(iVar1 + 2);
    if (param_1 != uVar2) {
      if (uVar2 == 0xffff) {
        *(undefined2 *)(this + 0xc) = *(undefined2 *)(iVar1 + 4);
        uVar2 = *(ushort *)(iVar1 + 4);
      }
      else {
        *(undefined2 *)(*(int *)this + 4 + (uint)uVar2 * 6) = *(undefined2 *)(iVar1 + 4);
        uVar2 = *(ushort *)(iVar1 + 4);
      }
      if (uVar2 == 0xffff) {
        *(undefined2 *)(this + 0xe) = *(undefined2 *)(iVar1 + 2);
      }
      else {
        *(undefined2 *)(*(int *)this + (uint)uVar2 * 6 + 2) = *(undefined2 *)(iVar1 + 2);
      }
      *(ushort *)(iVar1 + 4) = param_1;
      *(ushort *)(iVar1 + 2) = param_1;
      *(short *)(this + 0x12) = *(short *)(this + 0x12) + -1;
      return;
    }
    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)