L L4D2node

CUtlLinkedList<VisCacheEntry,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<VisCacheEntry,unsigned_short>,unsigned_short>>::LinkAfter

0x001a1d80 · 355 bytes · __thiscall

_ZN14CUtlLinkedListI13VisCacheEntrytLb0Et10CUtlMemoryI19UtlLinkedListElem_tIS0_tEtEE9LinkAfterEtt

Decompiled

undefined (3 params)

/* CUtlLinkedList<VisCacheEntry, unsigned short, false, unsigned short,
   CUtlMemory<UtlLinkedListElem_t<VisCacheEntry, unsigned short>, unsigned short>
   >::LinkAfter(unsigned short, unsigned short) */

void __thiscall
CUtlLinkedList<VisCacheEntry,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<VisCacheEntry,unsigned_short>,unsigned_short>>
::LinkAfter(CUtlLinkedList<VisCacheEntry,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<VisCacheEntry,unsigned_short>,unsigned_short>>
            *this,ushort param_1,ushort param_2)

{
  ushort uVar1;
  uint uVar2;
  int iVar3;
  int local_18;
  
  uVar2 = (uint)param_2;
  if (((int)uVar2 < *(int *)(this + 4)) && (param_2 <= *(ushort *)(this + 0x16))) {
    iVar3 = *(int *)this + uVar2 * 0xb0;
    uVar1 = *(ushort *)(iVar3 + 0xac);
    if (param_2 != uVar1) {
      if (uVar1 == 0xffff) {
        *(undefined2 *)(this + 0xc) = *(undefined2 *)(iVar3 + 0xae);
      }
      else {
        *(undefined2 *)(*(int *)this + 0xae + (uint)uVar1 * 0xb0) = *(undefined2 *)(iVar3 + 0xae);
      }
      if (*(ushort *)(iVar3 + 0xae) == 0xffff) {
        *(undefined2 *)(this + 0xe) = *(undefined2 *)(iVar3 + 0xac);
      }
      else {
        *(undefined2 *)((uint)*(ushort *)(iVar3 + 0xae) * 0xb0 + *(int *)this + 0xac) =
             *(undefined2 *)(iVar3 + 0xac);
      }
      *(ushort *)(iVar3 + 0xae) = param_2;
      *(ushort *)(iVar3 + 0xac) = param_2;
      *(short *)(this + 0x12) = *(short *)(this + 0x12) + -1;
    }
  }
  local_18 = uVar2 * 0xb0;
  local_18 = local_18 + *(int *)this;
  *(ushort *)(local_18 + 0xac) = param_1;
  if (param_1 == 0xffff) {
    *(undefined2 *)(local_18 + 0xae) = *(undefined2 *)(this + 0xc);
    *(ushort *)(this + 0xc) = param_2;
    uVar1 = *(ushort *)(local_18 + 0xae);
  }
  else {
    iVar3 = (uint)param_1 * 0xb0 + *(int *)this;
    *(undefined2 *)(local_18 + 0xae) = *(undefined2 *)(iVar3 + 0xae);
    *(ushort *)(iVar3 + 0xae) = param_2;
    uVar1 = *(ushort *)(local_18 + 0xae);
  }
  if (uVar1 == 0xffff) {
    *(short *)(this + 0x12) = *(short *)(this + 0x12) + 1;
    *(ushort *)(this + 0xe) = param_2;
    return;
  }
  *(ushort *)((uint)uVar1 * 0xb0 + *(int *)this + 0xac) = param_2;
  *(short *)(this + 0x12) = *(short *)(this + 0x12) + 1;
  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)