L L4D2node

GetBodygroupCount

0x003fbd70 · 44 bytes · __cdecl

_Z17GetBodygroupCountP10CStudioHdri

Decompiled

undefined (2 params)

/* GetBodygroupCount(CStudioHdr*, int) */

undefined4 GetBodygroupCount(CStudioHdr *param_1,int param_2)

{
  int iVar1;
  undefined4 uVar2;
  
  if (param_1 != (CStudioHdr *)0x0) {
    iVar1 = *(int *)param_1;
    uVar2 = 0;
    if (param_2 < *(int *)(iVar1 + 0xe8)) {
      uVar2 = *(undefined4 *)(iVar1 + 4 + param_2 * 0x10 + *(int *)(iVar1 + 0xec));
    }
    return uVar2;
  }
  return 0;
}

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)