L L4D2node

CBaseAnimating::InitBoneControllers

0x005e5910 · 288 bytes · __thiscall

_ZN14CBaseAnimating19InitBoneControllersEv

Decompiled

undefined (1 param)

/* CBaseAnimating::InitBoneControllers() */

void __thiscall CBaseAnimating::InitBoneControllers(CBaseAnimating *this)

{
  char cVar1;
  CStudioHdr *pCVar2;
  int iVar3;
  CStudioHdr *pCVar4;
  int iVar5;
  int iVar6;
  CStudioHdr *local_20;
  
  local_20 = *(CStudioHdr **)(this + 0x13e0);
  if (local_20 == (CStudioHdr *)0x0) {
    iVar5 = CBaseEntity::GetModel((CBaseEntity *)this);
    if (iVar5 == 0) {
      local_20 = *(CStudioHdr **)(this + 0x13e0);
    }
    else {
      LockStudioHdr(this);
      local_20 = *(CStudioHdr **)(this + 0x13e0);
    }
    if (local_20 == (CStudioHdr *)0x0) {
      return;
    }
  }
  if (*(int *)local_20 != 0) {
    iVar5 = *(int *)(*(int *)local_20 + 0xa4);
    iVar3 = 4;
    if (iVar5 < 5) {
      iVar3 = iVar5;
    }
    if (0 < iVar3) {
      iVar5 = 0;
      do {
        iVar6 = iVar5 + 1;
        SetBoneController(this,iVar5,0.0);
        iVar5 = iVar6;
      } while (iVar6 != iVar3);
    }
    cVar1 = CStudioHdr::SequencesAvailable(local_20);
    if (cVar1 != '\0') {
      for (iVar5 = 0; iVar3 = CStudioHdr::GetNumPoseParameters(local_20), iVar5 < iVar3;
          iVar5 = iVar5 + 1) {
        pCVar4 = *(CStudioHdr **)(this + 0x13e0);
        if (pCVar4 == (CStudioHdr *)0x0) {
          iVar3 = CBaseEntity::GetModel((CBaseEntity *)this);
          if (iVar3 == 0) {
            pCVar4 = *(CStudioHdr **)(this + 0x13e0);
          }
          else {
            LockStudioHdr(this);
            pCVar4 = *(CStudioHdr **)(this + 0x13e0);
          }
          pCVar2 = (CStudioHdr *)0x0;
          if (pCVar4 != (CStudioHdr *)0x0) goto LAB_005e599a;
        }
        else {
LAB_005e599a:
          pCVar2 = pCVar4;
          if (*(int *)pCVar4 == 0) {
            pCVar2 = (CStudioHdr *)0x0;
          }
        }
        SetPoseParameter(this,pCVar2,iVar5,0.0);
      }
    }
  }
  return;
}

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)