L L4D2node

Host_RunFrame

0x00179f50 · 261 bytes · __cdecl

_Z13Host_RunFramef

Decompiled

undefined (1 param)

/* Host_RunFrame(float) */

void Host_RunFrame(float param_1)

{
  undefined4 uVar1;
  longdouble lVar2;
  longdouble lVar3;
  double dVar4;
  double dVar5;
  
  g_bThreadedEngine = 0;
  if (*(int *)(host_profile._28_4_ + 0x30) == 0) {
    _Host_RunFrame(param_1);
    return;
  }
  lVar2 = (longdouble)Plat_FloatTime();
  _Host_RunFrame(param_1);
  lVar3 = (longdouble)Plat_FloatTime();
  Host_RunFrame(float)::timecount = Host_RunFrame(float)::timecount + 1;
  dVar4 = ((double)lVar3 + Host_RunFrame(float)::timetotal) - (double)lVar2;
  Host_RunFrame(float)::timetotal = dVar4;
  if (Host_RunFrame(float)::timecount < 1000) {
    return;
  }
  dVar5 = (double)lVar3 - Host_RunFrame(float)::timestart;
  uVar1 = CBaseServer::GetNumClients((CBaseServer *)&sv);
  ConMsg("host_profile : %i clients, %.1f msec, %.1f fps\n",uVar1,dVar4,
         (double)(float)(1000.0 / dVar5));
  Host_RunFrame(float)::timecount = 0;
  Host_RunFrame(float)::timetotal = 0.0;
  Host_RunFrame(float)::timestart = (double)lVar3;
  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)