L L4D2node

CBenchmarkResults::StartBenchmark

0x00114020 · 148 bytes · __thiscall

_ZN17CBenchmarkResults14StartBenchmarkERK8CCommand

Decompiled

undefined (2 params)

/* CBenchmarkResults::StartBenchmark(CCommand const&) */

void __thiscall CBenchmarkResults::StartBenchmark(CBenchmarkResults *this,CCommand *param_1)

{
  float fVar1;
  char cVar2;
  char *pcVar3;
  
  pcVar3 = "results.txt";
  if (1 < *(int *)param_1) {
    pcVar3 = *(char **)(param_1 + 0x40c);
  }
  cVar2 = COM_IsValidPath(pcVar3);
  if (cVar2 != '\0') {
    *this = (CBenchmarkResults)0x1;
    SetResultsFilename(this,pcVar3);
    ConVar::SetValue(5.332826e-39);
    fVar1 = realtime;
    *(undefined4 *)(this + 0x108) = host_framecount;
    *(int *)(this + 0x104) = (int)fVar1;
    return;
  }
  ConMsg("bench_start %s: invalid path.\n");
  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)