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 intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.