_Host_RunFrame_Server_Async
0x00177530 · 450 bytes · __cdecl
_Z27_Host_RunFrame_Server_Asynci
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* _Host_RunFrame_Server_Async(int) */
void _Host_RunFrame_Server_Async(int param_1)
{
int *piVar1;
int iVar2;
int iVar3;
undefined4 local_34;
undefined4 local_30;
undefined4 local_28;
undefined4 local_24;
int local_20;
local_34 = 0;
local_30 = 0;
if (_g_Telemetry == 0) {
local_20 = 0;
}
else {
(**(code **)(_g_Telemetry + 0x50))
(_g_Telemetry,&local_34,0,0,0,0,"/data/src/engine/./host.cpp",0xae2,
&_Host_RunFrame_Server_Async(int)::tm_fmt,"%s %d","_Host_RunFrame_Server_Async",
param_1);
local_20 = _g_Telemetry;
}
local_28 = local_34;
local_24 = local_30;
if (*(int *)(vprof_server_thread._28_4_ + 0x30) == 0) {
/* try { // try from 001776d8 to 001776dc has its CatchHandler @ 00177703 */
iVar3 = ThreadGetCurrentId();
iVar2 = g_MainThreadId;
if (iVar3 != g_VProfTargetThread) goto LAB_001775ec;
}
else {
/* try { // try from 001775d5 to 00177610 has its CatchHandler @ 00177703 */
iVar2 = ThreadGetCurrentId();
if (iVar2 == g_VProfTargetThread) goto LAB_001775ec;
iVar2 = ThreadGetCurrentId();
}
g_VProfTargetThread = iVar2;
LAB_001775ec:
iVar2 = _setjmp((__jmp_buf_tag *)host_abortserver_queued);
piVar1 = g_pMDLCache;
if (iVar2 == 0) {
(**(code **)(*g_pMDLCache + 0xb8))(g_pMDLCache);
iVar2 = 0;
if (0 < param_1) {
do {
g_ServerGlobalVariables._24_4_ = DAT_003b7f6c;
g_ServerGlobalVariables._36_4_ = param_1 - iVar2;
/* try { // try from 0017763e to 00177642 has its CatchHandler @ 00177718 */
_Host_RunFrame_Server(iVar2 == param_1 + -1);
iVar2 = iVar2 + 1;
} while (iVar2 != param_1);
}
(**(code **)(*piVar1 + 0xbc))(piVar1);
if (local_20 != 0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
}
else if (local_20 != 0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
return;
}
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.