L L4D2node

CTerrorPlayerAnimState::HandleActivity_PouncedByHunter

0x00511c20 · 466 bytes · __thiscall

_ZN22CTerrorPlayerAnimState30HandleActivity_PouncedByHunterEv

Decompiled

undefined (1 param)

/* CTerrorPlayerAnimState::HandleActivity_PouncedByHunter() */

int __thiscall CTerrorPlayerAnimState::HandleActivity_PouncedByHunter(CTerrorPlayerAnimState *this)

{
  uint uVar1;
  CBaseEntity *this_00;
  char cVar2;
  int iVar3;
  CBaseEntity *pCVar4;
  int *piVar5;
  undefined *puVar6;
  
  if (this[0x161] == (CTerrorPlayerAnimState)0x0) {
    iVar3 = -1;
  }
  else {
    piVar5 = *(int **)(this + 0x118);
    uVar1 = piVar5[0xf9a];
    if ((((uVar1 == 0xffffffff) ||
         (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
        (*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar6 + 4) == 0)) {
      cVar2 = (**(code **)(*piVar5 + 0x7e8))(piVar5);
      if (cVar2 == '\0') {
        if (this[0x166] != (CTerrorPlayerAnimState)0x0) {
LAB_00511d60:
          this[0x161] = (CTerrorPlayerAnimState)0x0;
          return -1;
        }
        iVar3 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
        if (iVar3 == 0x303) {
          this_00 = *(CBaseEntity **)(this + 0x118);
          pCVar4 = this_00;
          if (((byte)this_00[0x14d] & 0x10) != 0) {
            CBaseEntity::CalcAbsoluteVelocity(this_00);
            pCVar4 = *(CBaseEntity **)(this + 0x118);
          }
          if ((0.99 < *(float *)(pCVar4 + 0x490)) ||
             ((50.0 < SQRT(*(float *)(this_00 + 0x278) * *(float *)(this_00 + 0x278) +
                           *(float *)(this_00 + 0x274) * *(float *)(this_00 + 0x274)) &&
              (0.2 < *(float *)(pCVar4 + 0x490))))) goto LAB_00511d60;
        }
        else {
          iVar3 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
          if (iVar3 != 0x303) {
            (**(code **)(*(int *)this + 0x38))(this);
          }
        }
        return 0x303;
      }
      this[0x161] = (CTerrorPlayerAnimState)0x0;
      (**(code **)(*(int *)this + 0x38))(this);
      piVar5 = (int *)CTerrorPlayer::GetActiveTerrorWeapon(*(CTerrorPlayer **)(this + 0x118));
      iVar3 = 700;
      if (piVar5 != (int *)0x0) {
        cVar2 = (**(code **)(*piVar5 + 0x674))(piVar5);
        return 0x2bd - (uint)(cVar2 == '\0');
      }
    }
    else {
      iVar3 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
      if ((iVar3 != 0x302) || (0.99 < *(float *)(*(int *)(this + 0x118) + 0x490))) {
        (**(code **)(*(int *)this + 0x38))(this);
        iVar3 = 0x302;
      }
      else {
        iVar3 = 0x302;
      }
    }
  }
  return iVar3;
}

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)