L L4D2node

CBasePlayerAnimState::ComputeMainSequence

0x0041eae0 · 863 bytes · __thiscall

_ZN20CBasePlayerAnimState19ComputeMainSequenceEv

Decompiled

undefined (1 param)

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

void __thiscall CBasePlayerAnimState::ComputeMainSequence(CBasePlayerAnimState *this)

{
  CBaseAnimating *this_00;
  undefined4 uVar1;
  char cVar2;
  undefined4 uVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  int iVar7;
  float fVar8;
  CBaseAnimating *pCVar9;
  code *local_44;
  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/base_playeranimstate.cpp",0x1a2,
               &ComputeMainSequence()::tm_fmt,"(%s)%s","Unaccounted",
               "CBasePlayerAnimState::ComputeMainSequence");
    local_20 = ___atan2f_finite;
  }
  iVar7 = _DAT_0105db00;
  local_28 = local_34;
  local_24 = local_30;
  if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
                    /* try { // try from 0041ecd6 to 0041ed24 has its CatchHandler @ 0041ee66 */
    iVar4 = ThreadGetCurrentId();
    if (iVar7 == iVar4) {
      if ((char *)*_DAT_0105d15c != "CBasePlayerAnimState::ComputeMainSequence") {
        _DAT_0105d15c =
             (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc0b11c,(char *)0x1,0xbfafa1);
      }
      CVProfNode::EnterScope();
      DAT_0105d158 = '\0';
    }
  }
  this_00 = *(CBaseAnimating **)(this + 0x14);
                    /* try { // try from 0041eb9c to 0041ec77 has its CatchHandler @ 0041ee7b */
  uVar3 = (**(code **)(*(int *)this + 0x2c))(this);
  uVar1 = *(undefined4 *)(this + 0xa0);
  uVar3 = (**(code **)(*(int *)this + 0x50))(this,uVar3);
  *(undefined4 *)(this + 0xa0) = uVar3;
  iVar4 = (**(code **)(*(int *)this + 0x58))(this,uVar3);
  iVar5 = CBaseAnimating::GetSequenceActivity(this_00,*(int *)(this_00 + 0x494));
  iVar6 = CBaseAnimating::GetSequenceActivity(this_00,iVar4);
  iVar7 = _DAT_0105db00;
  if (iVar5 == iVar6) {
    if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
      iVar4 = ThreadGetCurrentId();
      if (iVar7 == 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 {
    iVar7 = 0;
    if (-1 < iVar4) {
      iVar7 = iVar4;
    }
    fVar8 = *(float *)(this_00 + 0x490);
    cVar2 = (**(code **)(*(int *)this_00 + 0x338))(this_00);
    if (cVar2 != '\0') {
      fVar8 = 1.0;
    }
    CBaseAnimating::ResetSequence(this_00,iVar7);
    cVar2 = (**(code **)(*(int *)this_00 + 0x16c))(this_00);
    if (cVar2 != '\0') {
      if (0.99 <= fVar8) {
                    /* try { // try from 0041ed90 to 0041edb3 has its CatchHandler @ 0041ee7b */
        cVar2 = (**(code **)(*(int *)this_00 + 0x16c))(this_00);
        pCVar9 = (CBaseAnimating *)0x0;
        if (cVar2 != '\0') {
          pCVar9 = this_00;
        }
        local_44 = *(code **)(*(int *)pCVar9 + 0x624);
        uVar3 = CBaseAnimating::GetSequenceActivity(this_00,iVar7);
      }
      else {
        cVar2 = (**(code **)(*(int *)this_00 + 0x16c))();
        pCVar9 = (CBaseAnimating *)0x0;
        if (cVar2 != '\0') {
          pCVar9 = this_00;
        }
        local_44 = *(code **)(*(int *)pCVar9 + 0x628);
        uVar3 = CBaseAnimating::GetSequenceActivity(this_00,iVar7);
      }
      (*local_44)(pCVar9,uVar3,uVar1);
    }
    iVar7 = _DAT_0105db00;
    if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
      iVar4 = ThreadGetCurrentId();
      if (iVar7 == 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)