L L4D2node

CDispInfo::ClearDecalFragments

0x00137f30 · 171 bytes · __thiscall

_ZN9CDispInfo19ClearDecalFragmentsEt

Decompiled

undefined (2 params)

/* CDispInfo::ClearDecalFragments(unsigned short) */

void __thiscall CDispInfo::ClearDecalFragments(CDispInfo *this,ushort param_1)

{
  int iVar1;
  ushort uVar2;
  ushort uVar3;
  int iVar4;
  
  iVar1 = (uint)param_1 * 0x50 + s_DispDecals;
  uVar2 = *(ushort *)(iVar1 + 0x48);
  while (uVar3 = uVar2, uVar3 != 0xffff) {
    uVar2 = *(ushort *)(s_DispDecalFragments + 0xe + (uint)uVar3 * 0x10);
    CUtlLinkedList<CDispDecalFragment,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CDispDecalFragment,unsigned_short>,unsigned_short>>
    ::Unlink((CUtlLinkedList<CDispDecalFragment,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CDispDecalFragment,unsigned_short>,unsigned_short>>
              *)&s_DispDecalFragments,uVar3);
    iVar4 = (uint)uVar3 * 0x10 + s_DispDecalFragments;
    if (*(void **)(iVar4 + 4) != (void *)0x0) {
      operator_delete__(*(void **)(iVar4 + 4));
    }
    *(undefined4 *)(iVar4 + 4) = 0;
    *(ushort *)(iVar4 + 0xe) = DAT_0039ec68;
    DAT_0039ec68 = uVar3;
  }
  *(byte *)(iVar1 + 0xc) = *(byte *)(iVar1 + 0xc) & 0xf7;
  *(undefined2 *)(iVar1 + 0x48) = 0xffff;
  *(undefined2 *)(iVar1 + 0x10) = 0;
  *(undefined2 *)(iVar1 + 0xe) = 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)