L L4D2node

CTerrorGameRules::SetScriptedHUDTimerMode

0x005078d0 · 269 bytes · __thiscall

_ZN16CTerrorGameRules23SetScriptedHUDTimerModeEii

Decompiled

undefined (3 params)

/* CTerrorGameRules::SetScriptedHUDTimerMode(int, int) */

void __thiscall
CTerrorGameRules::SetScriptedHUDTimerMode(CTerrorGameRules *this,int param_1,int param_2)

{
  undefined4 uVar1;
  int iVar2;
  int iVar3;
  longdouble lVar4;
  float fVar5;
  undefined4 local_24;
  float local_20 [4];
  
  iVar2 = param_2;
  if (0 < param_2) {
    if (param_2 < 3) {
      uVar1 = *(undefined4 *)(gpGlobals + 0xc);
      local_24 = uVar1;
      iVar3 = memcmp(this + param_1 * 4 + 0x654,&local_24,4);
      if (iVar3 != 0) {
        CGameRulesProxy::NotifyNetworkStateChanged();
        *(undefined4 *)(this + param_1 * 4 + 0x654) = uVar1;
      }
    }
    else if (param_2 == 3) {
      lVar4 = (longdouble)GetScriptedHUDTimer(this,param_1);
      fVar5 = (float)lVar4;
      if (fVar5 <= 0.0) {
        fVar5 = 0.0;
      }
      local_20[0] = fVar5;
      iVar3 = memcmp(this + param_1 * 4 + 0x664,local_20,4);
      if (iVar3 != 0) {
        CGameRulesProxy::NotifyNetworkStateChanged();
        *(float *)(this + param_1 * 4 + 0x664) = fVar5;
      }
    }
  }
  iVar3 = memcmp(this + param_1 * 4 + 0x644,&param_2,4);
  if (iVar3 != 0) {
    CGameRulesProxy::NotifyNetworkStateChanged();
    *(int *)(this + param_1 * 4 + 0x644) = iVar2;
  }
  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)