L L4D2node

studiohdr_t::GetAttachmentBone

0x000e1ac0 · 94 bytes · __thiscall

_ZN11studiohdr_t17GetAttachmentBoneEi

Decompiled

undefined (2 params)

/* studiohdr_t::GetAttachmentBone(int) */

int __thiscall studiohdr_t::GetAttachmentBone(studiohdr_t *this,int param_1)

{
  int iVar1;
  int iVar2;
  
  iVar1 = pAttachment(this,param_1);
  iVar2 = GetVirtualModel(this);
  if (iVar2 != 0) {
    iVar1 = *(int *)(*(int *)(*(int *)(*(int *)(iVar2 + 0x30) + param_1 * 8) * 0x90 +
                              *(int *)(iVar2 + 0x58) + 0x18) + *(int *)(iVar1 + 8) * 4);
    iVar2 = 0;
    if (iVar1 != -1) {
      iVar2 = iVar1;
    }
    return iVar2;
  }
  return *(int *)(iVar1 + 8);
}

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)