L L4D2node

CMultiPlayerAnimState::SetupPoseParameters

0x0046c310 · 654 bytes · __thiscall

_ZN21CMultiPlayerAnimState19SetupPoseParametersEP10CStudioHdr

Decompiled

undefined (2 params)

/* CMultiPlayerAnimState::SetupPoseParameters(CStudioHdr*) */

CMultiPlayerAnimState __thiscall
CMultiPlayerAnimState::SetupPoseParameters(CMultiPlayerAnimState *this,CStudioHdr *param_1)

{
  int iVar1;
  CBaseEntity *this_00;
  CBaseAnimating *this_01;
  undefined4 uVar2;
  int iVar3;
  CStudioHdr *pCVar4;
  CStudioHdr *pCVar5;
  
  if (this[0x2c] != (CMultiPlayerAnimState)0x0) {
    return this[0x2c];
  }
  if (param_1 == (CStudioHdr *)0x0) {
    return (CMultiPlayerAnimState)0x0;
  }
  uVar2 = CBaseAnimating::LookupPoseParameter(*(CBaseAnimating **)(this + 0x1c),param_1,"move_x");
  *(undefined4 *)(this + 0x30) = uVar2;
  uVar2 = CBaseAnimating::LookupPoseParameter(*(CBaseAnimating **)(this + 0x1c),param_1,"move_y");
  *(undefined4 *)(this + 0x34) = uVar2;
  uVar2 = CBaseAnimating::LookupPoseParameter(*(CBaseAnimating **)(this + 0x1c),param_1,"lean_x");
  *(undefined4 *)(this + 0x38) = uVar2;
  iVar3 = CBaseAnimating::LookupPoseParameter(*(CBaseAnimating **)(this + 0x1c),param_1,"lean_y");
  iVar1 = *(int *)(this + 0x38);
  *(int *)(this + 0x3c) = iVar3;
  if ((iVar1 < 0) || (iVar3 < 0)) goto LAB_0046c40f;
  this_00 = *(CBaseEntity **)(this + 0x1c);
  pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
  if (pCVar4 == (CStudioHdr *)0x0) {
    iVar3 = CBaseEntity::GetModel(this_00);
    if (iVar3 == 0) {
      pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
    }
    else {
      CBaseAnimating::LockStudioHdr((CBaseAnimating *)this_00);
      pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
    }
    pCVar5 = (CStudioHdr *)0x0;
    if (pCVar4 != (CStudioHdr *)0x0) goto LAB_0046c3b7;
  }
  else {
LAB_0046c3b7:
    pCVar5 = (CStudioHdr *)0x0;
    if (*(int *)pCVar4 != 0) {
      pCVar5 = pCVar4;
    }
  }
  CBaseAnimating::SetPoseParameter((CBaseAnimating *)this_00,pCVar5,iVar1,0.0);
  this_01 = *(CBaseAnimating **)(this + 0x1c);
  iVar1 = *(int *)(this + 0x3c);
  pCVar4 = *(CStudioHdr **)(this_01 + 0x13e0);
  if (pCVar4 == (CStudioHdr *)0x0) {
    iVar3 = CBaseEntity::GetModel((CBaseEntity *)this_01);
    if (iVar3 == 0) {
      pCVar4 = *(CStudioHdr **)(this_01 + 0x13e0);
    }
    else {
      CBaseAnimating::LockStudioHdr(this_01);
      pCVar4 = *(CStudioHdr **)(this_01 + 0x13e0);
    }
    pCVar5 = (CStudioHdr *)0x0;
    if (pCVar4 != (CStudioHdr *)0x0) goto LAB_0046c3ed;
  }
  else {
LAB_0046c3ed:
    pCVar5 = (CStudioHdr *)0x0;
    if (*(int *)pCVar4 != 0) {
      pCVar5 = pCVar4;
    }
  }
  CBaseAnimating::SetPoseParameter(this_01,pCVar5,iVar1,0.0);
LAB_0046c40f:
  uVar2 = CBaseAnimating::LookupPoseParameter
                    (*(CBaseAnimating **)(this + 0x1c),param_1,"body_pitch");
  *(undefined4 *)(this + 0x48) = uVar2;
  uVar2 = CBaseAnimating::LookupPoseParameter(*(CBaseAnimating **)(this + 0x1c),param_1,"body_yaw");
  *(undefined4 *)(this + 0x4c) = uVar2;
  uVar2 = CBaseAnimating::LookupPoseParameter
                    (*(CBaseAnimating **)(this + 0x1c),param_1,"head_pitch");
  *(undefined4 *)(this + 0x40) = uVar2;
  uVar2 = CBaseAnimating::LookupPoseParameter(*(CBaseAnimating **)(this + 0x1c),param_1,"head_yaw");
  *(undefined4 *)(this + 0x44) = uVar2;
  uVar2 = CBaseAnimating::LookupPoseParameter(*(CBaseAnimating **)(this + 0x1c),param_1,"dismount");
  *(undefined4 *)(this + 0x50) = uVar2;
  uVar2 = CBaseAnimating::LookupPoseParameter
                    (*(CBaseAnimating **)(this + 0x1c),param_1,"tongue_angle");
  *(undefined4 *)(this + 0x54) = uVar2;
  uVar2 = CBaseAnimating::LookupPoseParameter(*(CBaseAnimating **)(this + 0x1c),param_1,"vert_vel");
  *(undefined4 *)(this + 0x58) = uVar2;
  uVar2 = CBaseAnimating::LookupPoseParameter(*(CBaseAnimating **)(this + 0x1c),param_1,"horiz_vel")
  ;
  *(undefined4 *)(this + 0x5c) = uVar2;
  uVar2 = CBaseAnimating::LookupPoseParameter(*(CBaseAnimating **)(this + 0x1c),param_1,"jockey_x");
  *(undefined4 *)(this + 0x60) = uVar2;
  uVar2 = CBaseAnimating::LookupPoseParameter(*(CBaseAnimating **)(this + 0x1c),param_1,"jockey_y");
  this[0x2c] = (CMultiPlayerAnimState)0x1;
  *(undefined4 *)(this + 100) = uVar2;
  return (CMultiPlayerAnimState)0x1;
}

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)