CBaseServer::FillServerInfo
0x00107180 · 426 bytes · __thiscall
_ZN11CBaseServer14FillServerInfoER14SVC_ServerInfo
Decompiled
undefined (2 params)
/* CBaseServer::FillServerInfo(SVC_ServerInfo&) */
void __thiscall CBaseServer::FillServerInfo(CBaseServer *this,SVC_ServerInfo *param_1)
{
SVC_ServerInfo SVar1;
int *piVar2;
KeyValues *this_00;
int iVar3;
char *pcVar4;
undefined4 uVar5;
longdouble lVar6;
SVC_ServerInfo local_20;
V_FileBase(com_gamedir,FillServerInfo(SVC_ServerInfo&)::gamedir,0x104);
piVar2 = (int *)(**(code **)(*g_pMatchFramework + 0x28))(g_pMatchFramework);
this_00 = (KeyValues *)(**(code **)(*piVar2 + 4))(piVar2,0);
if (this_00 == (KeyValues *)0x0) {
local_20 = (SVC_ServerInfo)0x0;
}
else {
/* try { // try from 001071e5 to 0010724f has its CatchHandler @ 00107331 */
iVar3 = KeyValues::GetInt(this_00,"Game/vanilla",0);
local_20 = (SVC_ServerInfo)(iVar3 != 0);
pcVar4 = (char *)KeyValues::GetString(this_00,"Game/campaign","");
V_strncpy(FillServerInfo(SVC_ServerInfo&)::szMission,pcVar4,0x104);
pcVar4 = (char *)KeyValues::GetString(this_00,"Game/mode","");
V_strncpy(FillServerInfo(SVC_ServerInfo&)::szGameMode,pcVar4,0x104);
KeyValues::deleteThis();
}
uVar5 = GetNetworkVersion();
*(undefined4 *)(param_1 + 0x4c) = uVar5;
uVar5 = (**(code **)(*(int *)this + 0x40))(this);
*(undefined4 *)(param_1 + 0x50) = uVar5;
*(undefined4 *)(param_1 + 0x58) = *(undefined4 *)(this + 0xb0);
*(undefined4 *)(param_1 + 0x5c) = *(undefined4 *)(this + 0xb4);
*(undefined4 *)(param_1 + 0x60) = *(undefined4 *)(this + 0xb8);
uVar5 = (**(code **)(*(int *)this + 0x18))(this);
*(undefined4 *)(param_1 + 100) = uVar5;
*(undefined4 *)(param_1 + 0x68) = *(undefined4 *)(this + 0xf8);
SVar1 = (SVC_ServerInfo)(**(code **)(*(int *)this + 0x60))(this);
param_1[0x57] = (SVC_ServerInfo)0x4c;
param_1[0x54] = SVar1;
*(undefined1 **)(param_1 + 0x84) = FillServerInfo(SVC_ServerInfo&)::szMission;
*(undefined1 **)(param_1 + 0x88) = FillServerInfo(SVC_ServerInfo&)::szGameMode;
param_1[0x55] = local_20;
iVar3 = tolower(0x4c);
param_1[0x57] = SUB41(iVar3,0);
lVar6 = (longdouble)(**(code **)(*(int *)this + 0x30))(this);
*(undefined1 **)(param_1 + 0x74) = FillServerInfo(SVC_ServerInfo&)::gamedir;
*(float *)(param_1 + 0x70) = (float)lVar6;
uVar5 = (**(code **)(*(int *)this + 0x3c))(this);
*(undefined4 *)(param_1 + 0x78) = uVar5;
*(CBaseServer **)(param_1 + 0x7c) = this + 0x50;
uVar5 = (**(code **)(*(int *)this + 0x38))(this);
*(undefined4 *)(param_1 + 0x80) = uVar5;
SVar1 = (SVC_ServerInfo)(**(code **)(*(int *)this + 0x70))(this);
param_1[0x56] = SVar1;
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.