L L4D2node

CTerrorPlayer::GetAvailableSteadyStateSlots

0x009de290 · 114 bytes · __thiscall

_ZN13CTerrorPlayer28GetAvailableSteadyStateSlotsEv

Decompiled

undefined (1 param)

/* CTerrorPlayer::GetAvailableSteadyStateSlots() */

int __thiscall CTerrorPlayer::GetAvailableSteadyStateSlots(CTerrorPlayer *this)

{
  int iVar1;
  longdouble lVar2;
  float fVar3;
  
  iVar1 = CBasePlayer::GetAvailableSteadyStateSlots((CBasePlayer *)this);
  if ((iVar1 != 0) && ((*(uint *)(this + 0x23bc) & 0xfffffff7) == 0)) {
    if (*(float *)(this + 0x23c4) <= 0.0) {
      fVar3 = 99999.9;
    }
    else {
      lVar2 = (longdouble)IntervalTimer::Now();
      fVar3 = (float)lVar2 - *(float *)(this + 0x23c4);
    }
    if (*(float *)(ent_steadystate_cooldown._28_4_ + 0x2c) <= fVar3 &&
        fVar3 != *(float *)(ent_steadystate_cooldown._28_4_ + 0x2c)) {
      return iVar1;
    }
  }
  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)