L L4D2node

_Host_RunFirstFrame

0x00176cd0 · 286 bytes · unknown

_Z19_Host_RunFirstFramev

Decompiled

undefined (0 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* _Host_RunFirstFrame() */

void _Host_RunFirstFrame(void)

{
  char cVar1;
  int *piVar2;
  char *pcVar3;
  undefined4 local_24;
  undefined4 local_20;
  undefined4 local_18;
  undefined4 local_14;
  int local_10;
  
  local_24 = 0;
  local_20 = 0;
  if (_g_Telemetry == 0) {
    local_10 = 0;
  }
  else {
    (**(code **)(_g_Telemetry + 0x50))
              (_g_Telemetry,&local_24,0,0,0,0,"/data/src/engine/./host.cpp",0xaa2,
               &_Host_RunFirstFrame()::tm_fmt,&DAT_002c48a3,"_Host_RunFirstFrame");
    local_10 = _g_Telemetry;
  }
  local_18 = local_24;
  local_14 = local_20;
                    /* try { // try from 00176d5c to 00176d93 has its CatchHandler @ 00176dfb */
  NET_InitPostFork();
  piVar2 = (int *)CommandLine_Tier0();
  pcVar3 = (char *)(**(code **)(*piVar2 + 0x18))(piVar2,"-testscript",0);
  if (pcVar3 != (char *)0x0) {
    cVar1 = CTestScriptMgr::StartTestScript((CTestScriptMgr *)g_TestScriptMgr,pcVar3);
    if (cVar1 == '\0') {
                    /* try { // try from 00176de3 to 00176de7 has its CatchHandler @ 00176dfb */
      Error("StartTestScript( %s ) failed.",pcVar3);
    }
  }
  if (local_10 != 0) {
    (**(code **)(local_10 + 0x54))(local_10,local_18,local_14,0,0,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)