L L4D2node

CScriptHud::HUDReadTimer

0x00905e70 · 111 bytes · __thiscall

_ZN10CScriptHud12HUDReadTimerEi

Decompiled

undefined (2 params)

/* CScriptHud::HUDReadTimer(int) */

longdouble __thiscall CScriptHud::HUDReadTimer(CScriptHud *this,int param_1)

{
  longdouble lVar1;
  float fVar2;
  undefined4 local_14;
  
  local_14 = 0.0;
  if (g_pGameRules != (CTerrorGameRules *)0x0) {
    if ((uint)param_1 < 4) {
      lVar1 = (longdouble)CTerrorGameRules::GetScriptedHUDTimer(g_pGameRules,param_1);
      return lVar1;
    }
    local_14 = 0.0;
    if (param_1 == 4) {
      local_14 = 0.0;
      lVar1 = (longdouble)CTerrorGameRules::GetHoldoutCooldownEndTime(g_pGameRules);
      fVar2 = (float)lVar1 - *(float *)(gpGlobals + 0xc);
      if ((0.0 < fVar2) && (local_14 = 0.0, 0.0 <= (float)lVar1)) {
        local_14 = fVar2;
      }
    }
  }
  return (longdouble)local_14;
}

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)