L L4D2node

CTerrorPlayerAnimState::HandleJumping

0x0050f970 · 418 bytes · __thiscall

_ZN22CTerrorPlayerAnimState13HandleJumpingER8Activity

Decompiled

undefined (2 params)

/* CTerrorPlayerAnimState::HandleJumping(Activity&) */

undefined4 __thiscall
CTerrorPlayerAnimState::HandleJumping(CTerrorPlayerAnimState *this,Activity *param_1)

{
  CTerrorPlayerAnimState CVar1;
  char cVar2;
  int iVar3;
  uint uVar4;
  undefined4 uVar5;
  CTerrorPlayerAnimState CVar6;
  float fVar7;
  Vector local_28 [8];
  float local_20;
  
  CVar1 = this[0x14c];
  uVar4 = *(uint *)(*(int *)(this + 0x118) + 0x150);
  iVar3 = CMultiPlayerAnimState::GetMainActivity
                    (*(CMultiPlayerAnimState **)(*(int *)(this + 0x118) + 0x2910));
  if (5 < iVar3 - 0x209U) {
    uVar4 = uVar4 & 1 ^ 1;
    if (uVar4 != 0) {
      if (CVar1 != (CTerrorPlayerAnimState)0x1) {
        *(undefined4 *)(this + 0x150) = *(undefined4 *)(gpGlobals + 0xc);
        iVar3 = CBaseEntity::GetTeamNumber(*(CBaseEntity **)(this + 0x118));
        if (iVar3 == 3) {
          cVar2 = CTerrorPlayer::IsLunging(*(CTerrorPlayer **)(this + 0x118));
          if (cVar2 != '\0') {
            CMultiPlayerAnimState::StartGesture((CMultiPlayerAnimState *)this,0,0x2e3,0);
          }
        }
      }
      if (this[0xf8] != (CTerrorPlayerAnimState)0x0) {
        CMultiPlayerAnimState::GetOuterAbsVelocity((CMultiPlayerAnimState *)this,local_28);
        if (local_20 < 0.0) {
          this[0xf8] = (CTerrorPlayerAnimState)0x0;
        }
      }
    }
    CVar6 = SUB41(uVar4,0);
    fVar7 = *(float *)(this + 0x150);
    if (((CVar6 == (CTerrorPlayerAnimState)0x0) && (CVar1 != (CTerrorPlayerAnimState)0x0)) &&
       (fVar7 + 0.2 < *(float *)(gpGlobals + 0xc))) {
      CMultiPlayerAnimState::StartGesture((CMultiPlayerAnimState *)this,2,0x296,0);
      this[0xf8] = (CTerrorPlayerAnimState)0x0;
      fVar7 = *(float *)(this + 0x150);
    }
    iVar3 = gpGlobals;
    this[0x14c] = CVar6;
    uVar5 = 0;
    if ((*(float *)(iVar3 + 0xc) <= fVar7 + 1.0) && (CVar6 != (CTerrorPlayerAnimState)0x0)) {
      *(undefined4 *)param_1 = 0x1d;
      uVar5 = 1;
    }
    return uVar5;
  }
  return 0;
}

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)