L L4D2node

CBaseAnimating::GetAttachmentBone

0x005e2020 · 118 bytes · __thiscall

_ZN14CBaseAnimating17GetAttachmentBoneEi

Decompiled

undefined (2 params)

/* CBaseAnimating::GetAttachmentBone(int) */

undefined4 __thiscall CBaseAnimating::GetAttachmentBone(CBaseAnimating *this,int param_1)

{
  int iVar1;
  undefined4 uVar2;
  CStudioHdr *this_00;
  
  this_00 = *(CStudioHdr **)(this + 0x13e0);
  if (this_00 == (CStudioHdr *)0x0) {
    iVar1 = CBaseEntity::GetModel((CBaseEntity *)this);
    if (iVar1 == 0) {
      this_00 = *(CStudioHdr **)(this + 0x13e0);
    }
    else {
      LockStudioHdr(this);
      this_00 = *(CStudioHdr **)(this + 0x13e0);
    }
    if (this_00 == (CStudioHdr *)0x0) {
      return 0;
    }
  }
  if (((*(int *)this_00 != 0) && (0 < param_1)) &&
     (iVar1 = CStudioHdr::GetNumAttachments(this_00), param_1 <= iVar1)) {
    uVar2 = CStudioHdr::GetAttachmentBone(this_00,param_1 + -1);
    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)