CNetSupportImpl::GetServerInfo
0x001c1d40 · 278 bytes · __thiscall
_ZN15CNetSupportImpl13GetServerInfoEPN11INetSupport12ServerInfo_tE
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CNetSupportImpl::GetServerInfo(INetSupport::ServerInfo_t*) */
void __thiscall CNetSupportImpl::GetServerInfo(CNetSupportImpl *this,ServerInfo_t *param_1)
{
char cVar1;
ServerInfo_t SVar2;
ushort uVar3;
undefined4 uVar4;
int iVar5;
ServerInfo_t *pSVar6;
if (param_1 != (ServerInfo_t *)0x0) {
pSVar6 = param_1;
for (iVar5 = 0xc; iVar5 != 0; iVar5 = iVar5 + -1) {
*(undefined4 *)pSVar6 = 0;
pSVar6 = pSVar6 + 4;
}
*(undefined4 *)param_1 = net_local_adr;
*(undefined4 *)(param_1 + 4) = _DAT_003ac14c;
*(undefined2 *)(param_1 + 8) = (undefined2)DAT_003ac150;
cVar1 = NET_GetPublicAdr((netadr_s *)(param_1 + 0xc));
if (cVar1 == '\0') {
*(undefined4 *)(param_1 + 0xc) = *(undefined4 *)param_1;
*(undefined4 *)(param_1 + 0x10) = *(undefined4 *)(param_1 + 4);
*(undefined2 *)(param_1 + 0x14) = *(undefined2 *)(param_1 + 8);
}
uVar3 = NET_GetUDPPort(DAT_003b7f68);
*(ushort *)(param_1 + 0x18) = uVar3;
netadr_s::SetPort((netadr_s *)param_1,uVar3);
netadr_s::SetPort((netadr_s *)(param_1 + 0xc),*(ushort *)(param_1 + 0x18));
param_1[0x1a] = (ServerInfo_t)(0 < DAT_003b7f64);
param_1[0x1b] = DAT_003b8088;
SVar2 = (ServerInfo_t)CBaseServer::IsExclusiveToLobbyConnections((CBaseServer *)&sv);
param_1[0x1c] = SVar2;
param_1[0x1d] = (ServerInfo_t)(*(int *)(sv_steamgroup_exclusive._28_4_ + 0x30) != 0);
param_1[0x1e] = DAT_003b8186;
uVar4 = CBaseServer::GetName();
*(undefined1 **)(param_1 + 0x24) = &DAT_003b7f70;
*(undefined4 *)(param_1 + 0x20) = uVar4;
uVar4 = CBaseServer::GetMaxHumanPlayers((CBaseServer *)&sv);
*(undefined4 *)(param_1 + 0x28) = uVar4;
uVar4 = CBaseServer::GetNumHumanPlayers((CBaseServer *)&sv);
*(undefined4 *)(param_1 + 0x2c) = uVar4;
}
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.