L L4D2node

CMultiPlayerAnimState::Update

0x0046c5a0 · 873 bytes · __thiscall

_ZN21CMultiPlayerAnimState6UpdateEff

Decompiled

undefined (3 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CMultiPlayerAnimState::Update(float, float) */

void __thiscall
CMultiPlayerAnimState::Update(CMultiPlayerAnimState *this,float param_1,float param_2)

{
  CBaseEntity *this_00;
  char cVar1;
  int iVar2;
  int iVar3;
  CStudioHdr *pCVar4;
  longdouble lVar5;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_28;
  undefined4 local_24;
  int local_20;
  
  local_34 = 0;
  local_30 = 0;
  if (___atan2f_finite == 0) {
    local_20 = 0;
  }
  else {
    (**(code **)(___atan2f_finite + 0x50))
              (___atan2f_finite,&local_34,0,0,0,0,
               "/data/src/game/server/../../game/shared/multiplayer_animstate.cpp",0x58f,
               &Update(float,float)::tm_fmt,"(%s)%s","Unaccounted","CMultiPlayerAnimState::Update");
    local_20 = ___atan2f_finite;
  }
  iVar2 = _DAT_0105db00;
  local_28 = local_34;
  local_24 = local_30;
                    /* try { // try from 0046c76e to 0046c7bc has its CatchHandler @ 0046c947 */
  if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
     (iVar3 = ThreadGetCurrentId(), iVar2 == iVar3)) {
    if ((char *)*_DAT_0105d15c != "CMultiPlayerAnimState::Update") {
      _DAT_0105d15c =
           (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc168a1,(char *)0x1,0xbfafa1);
    }
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
  }
  this_00 = *(CBaseEntity **)(this + 0x1c);
  pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
  if (pCVar4 == (CStudioHdr *)0x0) {
                    /* try { // try from 0046c913 to 0046c923 has its CatchHandler @ 0046c95c */
    iVar2 = CBaseEntity::GetModel(this_00);
    if (iVar2 != 0) {
      CBaseAnimating::LockStudioHdr((CBaseAnimating *)this_00);
    }
    pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
    if (pCVar4 == (CStudioHdr *)0x0) goto LAB_0046c7d7;
  }
  if (*(int *)pCVar4 != 0) {
                    /* try { // try from 0046c672 to 0046c6d4 has its CatchHandler @ 0046c95c */
    cVar1 = ShouldUpdateAnimState(this);
    if (cVar1 != '\0') {
      lVar5 = (longdouble)AngleNormalize(param_1);
      *(float *)(this + 0xe4) = (float)lVar5;
      lVar5 = (longdouble)AngleNormalize(param_2);
      *(float *)(this + 0xe8) = (float)lVar5;
      (**(code **)(*(int *)this + 0x70))(this,pCVar4);
      cVar1 = SetupPoseParameters(this,pCVar4);
      if (cVar1 != '\0') {
        (**(code **)(*(int *)this + 0x5c))(this,pCVar4);
        (**(code **)(*(int *)this + 0x60))(this,pCVar4);
        (**(code **)(*(int *)this + 100))(this,pCVar4);
      }
      if (*(int *)(*(int *)(this + 0x1c) + 0x30) == 0) {
        iVar2 = 0;
      }
      else {
        iVar2 = *(int *)(*(int *)(this + 0x1c) + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
      }
      if (*(int *)(mp_showgestureslots._28_4_ + 0x30) == iVar2) {
                    /* try { // try from 0046c89b to 0046c8cb has its CatchHandler @ 0046c95c */
        DebugGestureInfo(this);
      }
      iVar2 = _DAT_0105db00;
      if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
         (iVar3 = ThreadGetCurrentId(), iVar2 == iVar3)) {
        cVar1 = CVProfNode::ExitScope();
        if (cVar1 != '\0') {
          _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
        }
        DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
      }
      if (local_20 == 0) {
        return;
      }
      (**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
      return;
    }
                    /* try { // try from 0046c7d5 to 0046c7d6 has its CatchHandler @ 0046c95c */
    (*(code *)**(undefined4 **)this)(this);
  }
LAB_0046c7d7:
  iVar2 = _DAT_0105db00;
  if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
     (iVar3 = ThreadGetCurrentId(), iVar2 == iVar3)) {
    cVar1 = CVProfNode::ExitScope();
    if (cVar1 != '\0') {
      _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
    }
    DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
  }
  if (local_20 != 0) {
    (**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,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)