CBaseServer::RunFrame
0x0010ba10 · 732 bytes · __thiscall
_ZN11CBaseServer8RunFrameEv
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CBaseServer::RunFrame() */
void __thiscall CBaseServer::RunFrame(CBaseServer *this)
{
uint *puVar1;
int iVar2;
char cVar3;
int iVar4;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
int local_1c;
undefined4 local_18;
undefined4 local_14;
int local_10;
local_34 = 0;
local_30 = 0;
if (_Plat_SetBenchmarkMode == 0) {
local_1c = 0;
}
else {
(**(code **)(_Plat_SetBenchmarkMode + 0x50))
(_Plat_SetBenchmarkMode,&local_34,0,0,0,0,"/data/src/engine/./baseserver.cpp",0x9cd,
&RunFrame()::tm_fmt,"(%s)%s","Networking","CBaseServer::RunFrame");
local_1c = _Plat_SetBenchmarkMode;
}
iVar2 = _DAT_0040b9d4;
local_24 = local_34;
local_20 = local_30;
if ((_DAT_0040b028 != 0) || (DAT_0040b02c == '\0')) {
/* try { // try from 0010bc76 to 0010bcd6 has its CatchHandler @ 0010bd24 */
iVar4 = ThreadGetCurrentId();
if (iVar2 == iVar4) {
if ((char *)*_DAT_0040b030 != "CBaseServer::RunFrame") {
_DAT_0040b030 =
(int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2a8506,(char *)0x0,0x2a6193);
}
puVar1 = (uint *)(_DAT_0040b0bc + 4 + _DAT_0040b030[0x1c] * 8);
*puVar1 = *puVar1 | 4;
CVProfNode::EnterScope();
DAT_0040b02c = '\0';
}
}
local_2c = 0;
local_28 = 0;
if (_g_Telemetry == 0) {
local_10 = 0;
}
else {
/* try { // try from 0010bb28 to 0010bb2a has its CatchHandler @ 0010bd03 */
(**(code **)(_g_Telemetry + 0x50))
(_g_Telemetry,&local_2c,0,0,0,0,"/data/src/engine/./baseserver.cpp",0x9ce,
&RunFrame()::tm_fmt,"CBaseServer::RunFrame");
local_10 = _g_Telemetry;
}
local_18 = local_2c;
local_14 = local_28;
/* try { // try from 0010bb4a to 0010bba8 has its CatchHandler @ 0010bd28 */
NET_ProcessSocket(*(int *)(this + 8),(IConnectionlessPacketHandler *)this);
CheckTimeouts(this);
UpdateUserSettings(this);
SendPendingServerInfo(this);
(**(code **)(*(int *)this + 0xfc))(this);
UpdateMasterServer(this);
if (0 < g_nForkID) {
UpdateParentProcess();
}
if (this[0x14d] != (CBaseServer)0x0) {
this[0x14d] = (CBaseServer)0x0;
RecalculateTags(this);
}
ProcessSplitScreenDisconnects(this);
if (local_10 != 0) {
(**(code **)(local_10 + 0x54))(local_10,local_18,local_14,0,0,0);
}
iVar2 = _DAT_0040b9d4;
if ((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) {
iVar4 = ThreadGetCurrentId();
if (iVar2 == iVar4) {
cVar3 = CVProfNode::ExitScope();
if (cVar3 != '\0') {
_DAT_0040b030 = (int *)_DAT_0040b030[0x19];
}
DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
}
}
if (local_1c != 0) {
(**(code **)(local_1c + 0x54))(local_1c,local_24,local_20,0,0,0);
}
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.