L L4D2node

CUtlLinkedList<CFriendlyFireIncident,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CFriendlyFireIncident,unsigned_short>,unsigned_short>>::Unlink

0x00850ed0 · 133 bytes · __thiscall

_ZN14CUtlLinkedListI21CFriendlyFireIncidenttLb0Et10CUtlMemoryI19UtlLinkedListElem_tIS0_tEtEE6UnlinkEt

Decompiled

undefined (2 params)

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

void __thiscall
CUtlLinkedList<CFriendlyFireIncident,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CFriendlyFireIncident,unsigned_short>,unsigned_short>>
::Unlink(CUtlLinkedList<CFriendlyFireIncident,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CFriendlyFireIncident,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 * 0xc;
    uVar2 = *(ushort *)(iVar1 + 8);
    if (param_1 != uVar2) {
      if (uVar2 == 0xffff) {
        *(undefined2 *)(this + 0xc) = *(undefined2 *)(iVar1 + 10);
        uVar2 = *(ushort *)(iVar1 + 10);
      }
      else {
        *(undefined2 *)(*(int *)this + 10 + (uint)uVar2 * 0xc) = *(undefined2 *)(iVar1 + 10);
        uVar2 = *(ushort *)(iVar1 + 10);
      }
      if (uVar2 == 0xffff) {
        *(undefined2 *)(this + 0xe) = *(undefined2 *)(iVar1 + 8);
      }
      else {
        *(undefined2 *)(*(int *)this + (uint)uVar2 * 0xc + 8) = *(undefined2 *)(iVar1 + 8);
      }
      *(ushort *)(iVar1 + 10) = param_1;
      *(ushort *)(iVar1 + 8) = 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)