L L4D2node

CUtlLinkedList<moverlayfragment_t,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<moverlayfragment_t,unsigned_short>,unsigned_short>>::RemoveAll

0x001d51f0 · 227 bytes · __thiscall

_ZN14CUtlLinkedListI18moverlayfragment_ttLb1Et10CUtlMemoryI19UtlLinkedListElem_tIS0_tEtEE9RemoveAllEv

Decompiled

undefined (1 param)

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

void __thiscall
CUtlLinkedList<moverlayfragment_t,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<moverlayfragment_t,unsigned_short>,unsigned_short>>
::RemoveAll(CUtlLinkedList<moverlayfragment_t,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<moverlayfragment_t,unsigned_short>,unsigned_short>>
            *this)

{
  int iVar1;
  ushort uVar2;
  int iVar3;
  ushort uVar4;
  
  uVar2 = *(ushort *)(this + 0x16);
  if (uVar2 != 0xffff) {
    iVar1 = *(int *)(this + 4);
    iVar3 = 0;
    if (0 < iVar1) {
      do {
        uVar4 = (ushort)iVar3;
        if (((iVar3 < iVar1) && (uVar4 <= uVar2)) &&
           ((iVar1 = iVar3 * 0x2c + *(int *)this, uVar4 != *(ushort *)(iVar1 + 0x28) ||
            (uVar4 == *(ushort *)(iVar1 + 0x2a))))) {
          *(undefined4 *)(iVar1 + 0x1c) = 0;
          CUtlMemory<overlayvert_t,int>::Purge((CUtlMemory<overlayvert_t,int> *)(iVar1 + 0x10));
          *(undefined4 *)(iVar1 + 0x20) = *(undefined4 *)(iVar1 + 0x10);
          CUtlMemory<overlayvert_t,int>::Purge((CUtlMemory<overlayvert_t,int> *)(iVar1 + 0x10));
          *(ushort *)(iVar1 + 0x28) = uVar4;
          *(undefined2 *)(iVar1 + 0x2a) = *(undefined2 *)(this + 0x10);
          uVar2 = *(ushort *)(this + 0x16);
          *(ushort *)(this + 0x10) = uVar4;
        }
      } while (((uVar2 != uVar4) && (iVar1 = *(int *)(this + 4), (int)(iVar3 + 1U & 0xffff) < iVar1)
               ) && (iVar3 = iVar3 + 1, iVar3 != 0xffff));
    }
    *(undefined2 *)(this + 0xc) = 0xffff;
    *(undefined2 *)(this + 0xe) = 0xffff;
    *(undefined2 *)(this + 0x12) = 0;
  }
  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)