L L4D2node

CTerrorPlayerAnimState::ShouldForceFeetToEyes

0x00513f20 · 797 bytes · __thiscall

_ZNK22CTerrorPlayerAnimState21ShouldForceFeetToEyesEv

Decompiled

undefined (1 param)

/* CTerrorPlayerAnimState::ShouldForceFeetToEyes() const */

undefined4 __thiscall CTerrorPlayerAnimState::ShouldForceFeetToEyes(CTerrorPlayerAnimState *this)

{
  uint uVar1;
  CTerrorPlayer *pCVar2;
  char cVar3;
  int iVar4;
  undefined4 uVar5;
  int *piVar6;
  undefined *puVar7;
  
  iVar4 = CMultiPlayerAnimState::GetGestureSlotActivity((CMultiPlayerAnimState *)this,0);
  if (iVar4 < 0x3be) {
    if (0x3b7 < iVar4) {
      return 1;
    }
    if (iVar4 == 0x2fa) {
      return 1;
    }
    if (iVar4 == 0x316) {
      return 1;
    }
    if (iVar4 == 0x265) {
      return 1;
    }
  }
  else if (iVar4 - 0x3bfU < 2) {
    return 1;
  }
  uVar5 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
  switch(uVar5) {
  case 0x2cf:
  case 0x2d0:
  case 0x2d2:
  case 0x2d4:
  case 0x2d9:
  case 0x2db:
  case 0x2de:
  case 0x2e0:
  case 0x2e3:
  case 0x2e9:
  case 0x2eb:
  case 0x2ec:
  case 0x2ee:
  case 0x2f1:
  case 0x2f9:
  case 0x2fa:
    break;
  default:
    piVar6 = *(int **)(this + 0x118);
    uVar1 = piVar6[0xce9];
    if ((((uVar1 == 0xffffffff) ||
         (puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
        (*(uint *)(puVar7 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar7 + 4) == 0)) {
      cVar3 = (**(code **)(*piVar6 + 0x7e8))(piVar6);
      if ((cVar3 != '\0') && ((&DAT_000039f1)[*(int *)(this + 0x118)] == '\0')) {
        return 0;
      }
      cVar3 = CMultiPlayerAnimState::IsGestureSlotActive((CMultiPlayerAnimState *)this,0);
      if ((cVar3 != '\0') &&
         (iVar4 = CTerrorPlayer::GetActiveTerrorWeapon(*(CTerrorPlayer **)(this + 0x118)),
         iVar4 != 0)) {
        piVar6 = (int *)CTerrorPlayer::GetActiveTerrorWeapon(*(CTerrorPlayer **)(this + 0x118));
        iVar4 = (**(code **)(*piVar6 + 0x638))(piVar6);
        if (iVar4 == 0x13) {
          return 1;
        }
      }
      if ((((((((&DAT_000039f1)[*(int *)(this + 0x118)] == '\0') &&
              (cVar3 = IsClimbingLedge(this), cVar3 == '\0')) &&
             (pCVar2 = *(CTerrorPlayer **)(this + 0x118), pCVar2[0x186] != (CTerrorPlayer)0x9)) &&
            ((this[0x162] == (CTerrorPlayerAnimState)0x0 &&
             (this[0x161] == (CTerrorPlayerAnimState)0x0)))) &&
           (this[0x169] == (CTerrorPlayerAnimState)0x0)) &&
          ((((this[0x159] == (CTerrorPlayerAnimState)0x0 &&
             (this[0x16a] == (CTerrorPlayerAnimState)0x0)) &&
            ((this[0x15d] == (CTerrorPlayerAnimState)0x0 &&
             (((*(int *)(this + 0x17c) == -1 && (this[0x167] == (CTerrorPlayerAnimState)0x0)) &&
              (this[0x164] == (CTerrorPlayerAnimState)0x0)))))) && (*(int *)(this + 0x174) == -1))))
         && ((((((uVar1 = *(uint *)(pCVar2 + 0x2a4c), uVar1 == 0xffffffff ||
                 (puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc
                 )) || ((*(uint *)(puVar7 + 8) != uVar1 >> 0xc || (*(int *)(puVar7 + 4) == 0)))) &&
               ((((uVar1 = *(uint *)(pCVar2 + 0x3ee0), uVar1 == 0xffffffff ||
                  (puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10,
                  puVar7 == (undefined *)0xfffffffc)) || (*(uint *)(puVar7 + 8) != uVar1 >> 0xc)) ||
                (*(int *)(puVar7 + 4) == 0)))) &&
              ((((uVar1 = *(uint *)(pCVar2 + 0x3edc), uVar1 == 0xffffffff ||
                 (puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc
                 )) || (*(uint *)(puVar7 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar7 + 4) == 0)))) &&
             ((cVar3 = CTerrorPlayer::IsPerformingActionOnSomeoneElse(pCVar2,0), cVar3 == '\0' &&
              (cVar3 = CTerrorPlayer::IsActionBeingPerformedOnMe
                                 (*(CTerrorPlayer **)(this + 0x118),0), cVar3 == '\0')))))) {
        pCVar2 = *(CTerrorPlayer **)(this + 0x118);
        cVar3 = CTerrorPlayer::IsRevivingSomeone(pCVar2);
        if ((cVar3 == '\0') && (cVar3 = CTerrorPlayer::IsBeingRevived(pCVar2), cVar3 == '\0')) {
          uVar5 = CTerrorGameRules::IsInIntro(g_pGameRules);
          return uVar5;
        }
      }
    }
  }
  return 1;
}

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)