L L4D2node

CLeap::IsAbilityReadyToFire

0x004d8580 · 331 bytes · __thiscall

_ZNK5CLeap20IsAbilityReadyToFireEv

Decompiled

undefined (1 param)

/* CLeap::IsAbilityReadyToFire() const */

undefined4 __thiscall CLeap::IsAbilityReadyToFire(CLeap *this)

{
  uint uVar1;
  CLeap *pCVar2;
  char cVar3;
  undefined4 uVar4;
  undefined *puVar5;
  longdouble lVar6;
  CLeap *this_00;
  
  uVar1 = *(uint *)(this + 0x44c);
  if (((((uVar1 != 0xffffffff) &&
        (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
       (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) &&
      ((pCVar2 = *(CLeap **)(puVar5 + 4), pCVar2 != (CLeap *)0x0 &&
       (this_00 = pCVar2, cVar3 = (**(code **)(*(int *)pCVar2 + 0x558))(), cVar3 == '\0')))) &&
     ((((uVar1 = *(uint *)(pCVar2 + 0x3edc), uVar1 == 0xffffffff ||
        ((puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc ||
         (*(uint *)(puVar5 + 8) != uVar1 >> 0xc)))) || (*(int *)(puVar5 + 4) == 0)) &&
      (((((uVar1 = *(uint *)(pCVar2 + 0x3e64), uVar1 == 0xffffffff ||
          (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
         (*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar5 + 4) == 0)) &&
       (((byte)pCVar2[0x1cb1] & 8) == 0)))))) {
    if (0.0 < *(float *)(this + 0x448)) {
      this_00 = this + 0x440;
      lVar6 = (longdouble)CountdownTimer::Now();
      if ((float)lVar6 < *(float *)(this + 0x448)) {
        return 0;
      }
    }
    if ((this[0x47d] == (CLeap)0x0) && (cVar3 = CanLeapAgain(this_00), cVar3 != '\0')) {
      return 1;
    }
    if (this[0x47c] == (CLeap)0x0) {
      uVar4 = CBaseAbility::IsAbilityReadyToFire((CBaseAbility *)this);
      return uVar4;
    }
  }
  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)