L L4D2node

GetBodygroup

0x003fbc10 · 70 bytes · __cdecl

_Z12GetBodygroupP10CStudioHdrii

Decompiled

undefined (3 params)

/* GetBodygroup(CStudioHdr*, int, int) */

int GetBodygroup(CStudioHdr *param_1,int param_2,int param_3)

{
  int iVar1;
  int iVar2;
  int iVar3;
  
  if (param_1 != (CStudioHdr *)0x0) {
    iVar3 = *(int *)param_1;
    iVar2 = 0;
    if (param_3 < *(int *)(iVar3 + 0xe8)) {
      iVar3 = param_3 * 0x10 + *(int *)(iVar3 + 0xec) + iVar3;
      iVar1 = *(int *)(iVar3 + 4);
      if (1 < iVar1) {
        iVar2 = (param_2 / *(int *)(iVar3 + 8)) % iVar1;
      }
    }
    return iVar2;
  }
  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)