CBaseServer::UpdateMasterServer
0x0010a640 · 439 bytes · __thiscall
_ZN11CBaseServer18UpdateMasterServerEv
Decompiled
undefined (1 param)
/* CBaseServer::UpdateMasterServer() */
void __thiscall CBaseServer::UpdateMasterServer(CBaseServer *this)
{
char cVar1;
char cVar2;
int iVar3;
int *piVar4;
longdouble lVar5;
cVar1 = (**(code **)(*(int *)this + 0x100))(this);
if (cVar1 != '\0') {
cVar1 = IsUsingMasterLegacyMode();
if (cVar1 != '\0') {
(**(code **)(*(int *)g_pMaster + 0x1c))(g_pMaster,this);
return;
}
iVar3 = Steam3Server();
if (*(int *)(iVar3 + 4) != 0) {
ForwardPacketsFromMasterServerUpdater(this);
lVar5 = (longdouble)Plat_FloatTime();
if (2.0 <= (double)lVar5 - *(double *)(this + 0x150)) {
*(double *)(this + 0x150) = (double)lVar5;
CheckMasterServerRequestRestart(this);
cVar1 = NET_IsDedicated();
if ((cVar1 != '\0') && (*(int *)(sv_region._28_4_ + 0x30) == -1)) {
ConVar::SetValue(0x350d00);
}
if ((UpdateMasterServer()::bUpdateMasterServers == '\0') &&
(iVar3 = __cxa_guard_acquire(&UpdateMasterServer()::bUpdateMasterServers), iVar3 != 0)) {
/* try { // try from 0010a7b4 to 0010a7c8 has its CatchHandler @ 0010a805 */
piVar4 = (int *)CommandLine_Tier0();
iVar3 = (**(code **)(*piVar4 + 0x28))(piVar4,"-nomaster");
UpdateMasterServer()::bUpdateMasterServers = iVar3 == 0;
__cxa_guard_release(&UpdateMasterServer()::bUpdateMasterServers);
}
if (UpdateMasterServer()::bUpdateMasterServers != '\0') {
cVar1 = (**(code **)(*(int *)this + 0x58))(this);
if ((cVar1 == '\0') ||
(cVar2 = (**(code **)(*(int *)this + 0x68))(this), cVar1 = g_bEnableMasterServerUpdater
, cVar2 == '\0')) {
cVar1 = '\0';
}
cVar2 = ShouldHideFromMasterServer(this);
if (cVar2 == '\0') {
iVar3 = Steam3Server();
(**(code **)(**(int **)(iVar3 + 4) + 0x60))(*(int **)(iVar3 + 4),cVar1);
if (cVar1 != '\0') {
UpdateMasterServerRules(this);
(**(code **)(*(int *)this + 0x104))(this);
UpdateMasterServerBasicData(this);
return;
}
}
else {
iVar3 = Steam3Server();
(**(code **)(**(int **)(iVar3 + 4) + 0x60))(*(int **)(iVar3 + 4),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.