L L4D2node

CTerrorPlayerAnimState::ShouldHideWeapon

0x00513930 · 331 bytes · __thiscall

_ZNK22CTerrorPlayerAnimState16ShouldHideWeaponEv

Decompiled

undefined (1 param)

/* CTerrorPlayerAnimState::ShouldHideWeapon() const */

bool __thiscall CTerrorPlayerAnimState::ShouldHideWeapon(CTerrorPlayerAnimState *this)

{
  CCSPlayer *this_00;
  uint uVar1;
  char cVar2;
  bool bVar3;
  int *piVar4;
  undefined *puVar5;
  longdouble extraout_ST0;
  
  this_00 = *(CCSPlayer **)(this + 0x118);
  uVar1 = *(uint *)(this_00 + 0x2e28);
  if (((((((uVar1 == 0xffffffff) ||
          (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
         (*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar5 + 4) == 0)) &&
       (((uVar1 = *(uint *)(this_00 + 0x3e68), uVar1 == 0xffffffff ||
         (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
        ((*(uint *)(puVar5 + 8) != uVar1 >> 0xc || (*(int *)(puVar5 + 4) == 0)))))) &&
      (((uVar1 = *(uint *)(this_00 + 0x3e48), uVar1 == 0xffffffff ||
        (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
       ((*(uint *)(puVar5 + 8) != uVar1 >> 0xc || (*(int *)(puVar5 + 4) == 0)))))) &&
     (((((uVar1 = *(uint *)(this_00 + 0x3ee0), uVar1 == 0xffffffff ||
         (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
        (*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar5 + 4) == 0)) &&
      ((piVar4 = (int *)CCSPlayer::GetActiveCSWeapon(this_00), piVar4 == (int *)0x0 ||
       (cVar2 = (**(code **)(*piVar4 + 0x648))(piVar4), cVar2 == '\0')))))) {
    bVar3 = false;
    if (0.0 < *(float *)(this + 0x198)) {
      CountdownTimer::Now();
      bVar3 = (float)extraout_ST0 < *(float *)(this + 0x198);
    }
  }
  else {
    bVar3 = true;
  }
  return bVar3;
}

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)