L L4D2node

CStudioHdr::GetAttachmentBone

0x0059d940 · 96 bytes · __thiscall

_ZN10CStudioHdr17GetAttachmentBoneEi

Decompiled

undefined (2 params)

/* CStudioHdr::GetAttachmentBone(int) */

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

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

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)