L L4D2node

sv_benchmark_force_start

0x003deb70 · 185 bytes · __cdecl

_ZL24sv_benchmark_force_startRK8CCommand

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* sv_benchmark_force_start(CCommand const&) */

void sv_benchmark_force_start(CCommand *param_1)

{
  char cVar1;
  longdouble lVar2;
  
  cVar1 = UTIL_IsCommandIssuedByServerAdmin();
  if (cVar1 == '\0') {
    return;
  }
  _DAT_00f72054 = 1;
  if (CServerBenchmarkHook::s_pBenchmarkHook == (int *)0x0) {
    Error("This game doesn\'t support server benchmarks (no CServerBenchmarkHook found).");
  }
  _DAT_00f72004 = 1;
  lVar2 = (longdouble)Plat_FloatTime();
  _DAT_00f72014 = 0x3f800000;
  _DAT_00f72028 = 0;
  _DAT_00f7201c = 0xffffffff;
  _DAT_00f7200c = (float)lVar2;
  (**(code **)(*engine + 0x1c4))(engine,1);
  (**(code **)*CServerBenchmarkHook::s_pBenchmarkHook)(CServerBenchmarkHook::s_pBenchmarkHook);
  (**(code **)(*CServerBenchmarkHook::s_pBenchmarkHook + 8))
            (CServerBenchmarkHook::s_pBenchmarkHook,&DAT_00f72040);
  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)