L L4D2node

CScriptHud::HUDManageTimers

0x00905d10 · 327 bytes · __thiscall

_ZN10CScriptHud15HUDManageTimersEiif

Decompiled

undefined (4 params)

/* CScriptHud::HUDManageTimers(int, int, float) */

void __thiscall CScriptHud::HUDManageTimers(CScriptHud *this,int param_1,int param_2,float param_3)

{
  float *__s2;
  int iVar1;
  CTerrorGameRules *this_00;
  undefined4 local_2c;
  float local_28;
  float local_24;
  float local_20 [4];
  
  this_00 = g_pGameRules;
  if (g_pGameRules == (CTerrorGameRules *)0x0) {
    return;
  }
  switch(param_2) {
  case 0:
    local_2c = 0;
    iVar1 = memcmp(g_pGameRules + param_1 * 4 + 0x664,&local_2c,4);
    if (iVar1 != 0) {
      CGameRulesProxy::NotifyNetworkStateChanged();
      *(undefined4 *)(this_00 + param_1 * 4 + 0x664) = 0;
      this_00 = g_pGameRules;
    }
    break;
  case 1:
  case 2:
    if (param_3 != 0.0) {
      local_24 = param_3;
      iVar1 = memcmp(g_pGameRules + param_1 * 4 + 0x664,&local_24,4);
      if (iVar1 != 0) {
        CGameRulesProxy::NotifyNetworkStateChanged();
        *(float *)(this_00 + param_1 * 4 + 0x664) = param_3;
        this_00 = g_pGameRules;
      }
    }
    break;
  case 3:
    break;
  case 4:
    local_28 = param_3;
    __s2 = &local_28;
    goto LAB_00905dbd;
  default:
    __s2 = local_20;
    local_20[0] = param_3;
LAB_00905dbd:
    iVar1 = memcmp(g_pGameRules + param_1 * 4 + 0x664,__s2,4);
    if (iVar1 != 0) {
      CGameRulesProxy::NotifyNetworkStateChanged();
      *(float *)(this_00 + param_1 * 4 + 0x664) = param_3;
    }
    return;
  }
  CTerrorGameRules::SetScriptedHUDTimerMode(this_00,param_1,param_2);
  return;
}

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)