L L4D2node

CDecalVertCache::AllocBlock

0x001da9f0 · 64 bytes · __thiscall

_ZN15CDecalVertCache10AllocBlockEv

Decompiled

undefined (1 param)

/* CDecalVertCache::AllocBlock() */

int __thiscall CDecalVertCache::AllocBlock(CDecalVertCache *this)

{
  int iVar1;
  undefined4 uVar2;
  
  if (*(int *)(this + 0x20000) == 0) {
    return 0xffff;
  }
  iVar1 = *(int *)(this + 0x20004);
  *(undefined4 *)(this + iVar1 * 0x80 + 0x4c) = 0;
  uVar2 = *(undefined4 *)(this + iVar1 * 0x80 + 0x2c);
  *(int *)(this + 0x20000) = *(int *)(this + 0x20000) + -1;
  *(undefined4 *)(this + 0x20004) = uVar2;
  return iVar1;
}

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)