L L4D2node

CTerrorWeapon::CanFidget

0x0056d7c0 · 719 bytes · __thiscall

_ZN13CTerrorWeapon9CanFidgetEv

Decompiled

undefined (1 param)

/* CTerrorWeapon::CanFidget() */

uint __thiscall CTerrorWeapon::CanFidget(CTerrorWeapon *this)

{
  char cVar1;
  CBaseCombatCharacter *this_00;
  int iVar2;
  uint uVar3;
  undefined *puVar4;
  longdouble lVar5;
  
  this_00 = (CBaseCombatCharacter *)GetPlayerOwner(this);
  if ((((((this_00 != (CBaseCombatCharacter *)0x0) &&
         (cVar1 = (**(code **)(*(int *)this_00 + 0x7e8))(this_00), cVar1 == '\0')) &&
        ((uVar3 = *(uint *)(this_00 + 0x2d64), uVar3 == 0xffffffff ||
         (((puVar4 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc ||
           (*(uint *)(puVar4 + 8) != uVar3 >> 0xc)) || (*(int *)(puVar4 + 4) == 0)))))) &&
       ((iVar2 = CBaseCombatCharacter::GetActiveWeapon(this_00), iVar2 == 0 ||
        (*(char *)(iVar2 + 0x1459) == '\0')))) &&
      (lVar5 = (longdouble)(**(code **)(*(int *)this_00 + 0x4b0))(this_00,0xffffffff),
      5.0 <= (float)lVar5)) &&
     (((((uVar3 = *(uint *)(this_00 + 0x2088), uVar3 == 0xffffffff ||
         (puVar4 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
        ((*(uint *)(puVar4 + 8) != uVar3 >> 0xc || (*(int *)(puVar4 + 4) == 0)))) &&
       (((this_00[0x39f1] == (CBaseCombatCharacter)0x0 &&
         (this_00[0x186] != (CBaseCombatCharacter)0x9)) &&
        ((uVar3 = *(uint *)(this_00 + 0x2e28), uVar3 == 0xffffffff ||
         (((puVar4 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc ||
           (*(uint *)(puVar4 + 8) != uVar3 >> 0xc)) || (*(int *)(puVar4 + 4) == 0)))))))) &&
      (((uVar3 = *(uint *)(this_00 + 0x2e24), uVar3 == 0xffffffff ||
        (puVar4 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
       ((*(uint *)(puVar4 + 8) != uVar3 >> 0xc || (*(int *)(puVar4 + 4) == 0)))))))) {
    if (this_00[0x33dc] != (CBaseCombatCharacter)0x0) {
      return 0;
    }
    uVar3 = *(uint *)(this_00 + 0x33c4);
    if (((uVar3 != 0xffffffff) &&
        (puVar4 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
       ((*(uint *)(puVar4 + 8) == uVar3 >> 0xc &&
        ((*(int *)(puVar4 + 4) != 0 &&
         (lVar5 = (longdouble)IntervalTimer::Now(),
         1.0 < (float)lVar5 - *(float *)(this_00 + 0x33cc))))))) {
      return 0;
    }
    uVar3 = *(uint *)(this_00 + 0x1d14);
    if (((((((uVar3 == 0xffffffff) ||
            (puVar4 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
           (*(uint *)(puVar4 + 8) != uVar3 >> 0xc)) || (*(int *)(puVar4 + 4) == 0)) &&
         (((uVar3 = *(uint *)(this_00 + 0x33ac), uVar3 == 0xffffffff ||
           (puVar4 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
          ((*(uint *)(puVar4 + 8) != uVar3 >> 0xc || (*(int *)(puVar4 + 4) == 0)))))) &&
        (((uVar3 = *(uint *)(this_00 + 0x3e68), uVar3 == 0xffffffff ||
          (puVar4 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
         ((*(uint *)(puVar4 + 8) != uVar3 >> 0xc || (*(int *)(puVar4 + 4) == 0)))))) &&
       (cVar1 = CTerrorPlayer::IsPummelVictim((CTerrorPlayer *)this_00), cVar1 == '\0')) {
      uVar3 = CTerrorPlayer::IsGettingUp((CTerrorPlayer *)this_00);
      return uVar3 ^ 1;
    }
  }
  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)