L L4D2node

CMultiPlayerAnimState::ComputeMainSequence

0x0046a560 · 869 bytes · __thiscall

_ZN21CMultiPlayerAnimState19ComputeMainSequenceEv

Decompiled

undefined (1 param)

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

void __thiscall CMultiPlayerAnimState::ComputeMainSequence(CMultiPlayerAnimState *this)

{
  CBaseAnimating *this_00;
  code *pcVar1;
  char cVar2;
  undefined4 uVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  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",0x50a,
               &ComputeMainSequence()::tm_fmt,"(%s)%s","Unaccounted",
               "CBasePlayerAnimState::ComputeMainSequence");
    local_20 = ___atan2f_finite;
  }
  iVar6 = _DAT_0105db00;
  local_28 = local_34;
  local_24 = local_30;
                    /* try { // try from 0046a6b6 to 0046a704 has its CatchHandler @ 0046a8df */
  if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
     (iVar4 = ThreadGetCurrentId(), iVar6 == iVar4)) {
    if ((char *)*_DAT_0105d15c != "CBasePlayerAnimState::ComputeMainSequence") {
      _DAT_0105d15c =
           (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc0b11c,(char *)0x1,0xbfafa1);
    }
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
  }
                    /* try { // try from 0046a619 to 0046a64a has its CatchHandler @ 0046a8f4 */
  uVar3 = (**(code **)(*(int *)this + 8))(this);
  iVar6 = *(int *)(this + 0x108);
  *(undefined4 *)(this + 0x114) = uVar3;
  if (iVar6 < 0) {
LAB_0046a73d:
    pcVar1 = *(code **)(*(int *)this + 0x34);
    uVar3 = (**(code **)(*(int *)this + 0x18))(this,uVar3);
    iVar4 = (*pcVar1)(this,uVar3);
    iVar6 = 0;
    if (-1 < iVar4) {
      iVar6 = iVar4;
    }
    iVar4 = CBaseAnimating::GetSequenceActivity
                      (*(CBaseAnimating **)(this + 0x1c),
                       *(int *)(*(CBaseAnimating **)(this + 0x1c) + 0x494));
    iVar5 = CBaseAnimating::GetSequenceActivity(*(CBaseAnimating **)(this + 0x1c),iVar6);
    if (iVar4 != iVar5) {
      pcVar1 = *(code **)(*(int *)this + 0x1c);
      uVar3 = CBaseAnimating::GetSequenceActivity
                        (*(CBaseAnimating **)(this + 0x1c),
                         *(int *)(*(CBaseAnimating **)(this + 0x1c) + 0x494));
      iVar4 = (*pcVar1)(this,uVar3);
      pcVar1 = *(code **)(*(int *)this + 0x1c);
      uVar3 = CBaseAnimating::GetSequenceActivity(*(CBaseAnimating **)(this + 0x1c),iVar6);
      iVar5 = (*pcVar1)(this,uVar3);
      if (((iVar4 != 10) && (iVar4 != 6)) || ((iVar5 != 10 && (iVar5 != 6)))) {
        (**(code **)(*(int *)this + 0x38))(this);
      }
      CBaseAnimating::ResetSequence(*(CBaseAnimating **)(this + 0x1c),iVar6);
    }
    iVar6 = _DAT_0105db00;
    if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
       (iVar4 = ThreadGetCurrentId(), iVar6 == iVar4)) {
      cVar2 = CVProfNode::ExitScope();
      if (cVar2 != '\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;
    }
  }
  else {
    this_00 = *(CBaseAnimating **)(this + 0x1c);
    if (iVar6 == *(int *)(this_00 + 0x494)) {
      if (this_00[0x488] != (CBaseAnimating)0x0) {
        *(undefined4 *)(this + 0x108) = 0xffffffff;
                    /* try { // try from 0046a734 to 0046a7f3 has its CatchHandler @ 0046a8f4 */
        (**(code **)(*(int *)this + 0x38))(this);
        uVar3 = *(undefined4 *)(this + 0x114);
        goto LAB_0046a73d;
      }
    }
    else {
      CBaseAnimating::ResetSequence(this_00,iVar6);
    }
    iVar6 = _DAT_0105db00;
    if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
       (iVar4 = ThreadGetCurrentId(), iVar6 == iVar4)) {
      cVar2 = CVProfNode::ExitScope();
      if (cVar2 != '\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)