L L4D2node

CalcProceduralBone

0x00b8e6d0 · 195 bytes · __cdecl

_Z18CalcProceduralBonePK10CStudioHdriR13CBoneAccessor

Decompiled

undefined (3 params)

/* CalcProceduralBone(CStudioHdr const*, int, CBoneAccessor&) */

undefined4 CalcProceduralBone(CStudioHdr *param_1,int param_2,CBoneAccessor *param_3)

{
  int iVar1;
  undefined4 uVar2;
  mstudiobone_t *pmVar3;
  
  uVar2 = 0;
  if ((*(byte *)(*(int *)(param_1 + 0x2c) + param_2 * 4) & 4) != 0) {
    pmVar3 = (mstudiobone_t *)(*(int *)param_1 + *(int *)(*(int *)param_1 + 0xa0));
    iVar1 = *(int *)(pmVar3 + param_2 * 0xd8 + 0xa4);
    if (iVar1 == 2) {
      DoQuatInterpBone(pmVar3,param_2,param_3);
      return 1;
    }
    if (iVar1 < 3) {
      if (iVar1 != 1) {
        return 0;
      }
      DoAxisInterpBone(pmVar3,param_2,param_3);
      return 1;
    }
    if (iVar1 == 3) {
      param_1 = (CStudioHdr *)0x0;
    }
    else if (iVar1 != 4) {
      return 0;
    }
    DoAimAtBone(pmVar3,param_2,param_3,param_1);
    uVar2 = 1;
  }
  return uVar2;
}

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)