L L4D2node

CServerBenchmark::EndBenchmark

0x003def20 · 237 bytes · __thiscall

_ZN16CServerBenchmark12EndBenchmarkEv

Decompiled

undefined (1 param)

/* CServerBenchmark::EndBenchmark() */

void __thiscall CServerBenchmark::EndBenchmark(CServerBenchmark *this)

{
  float fVar1;
  int *piVar2;
  int iVar3;
  double in_XMM0_Qa;
  
  Benchmark_ValidTime();
  fVar1 = *(float *)(this + 8);
  if (*(int *)(this + 0x54) == 2) {
    iVar3 = (**(code **)(filesystem[1] + 8))
                      (filesystem + 1,"sv_benchmark_results.txt",&DAT_00bf9593,"DEFAULT_WRITE_PATH")
    ;
    if (iVar3 != 0) {
      (**(code **)(*filesystem + 100))
                (filesystem,iVar3,"sv_benchmark := %.2f\n",
                 (double)(float)(in_XMM0_Qa - (double)fVar1));
    }
    (**(code **)(filesystem[1] + 0xc))(filesystem + 1,iVar3);
    (**(code **)(*engine + 0x94))(engine,"quit\n");
  }
  piVar2 = engine;
  *(undefined4 *)(this + 4) = 0;
  (**(code **)(*piVar2 + 0x1c4))(piVar2,0);
  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)