CBaseServer::GetNetStats
0x00106d90 · 199 bytes · __thiscall
_ZN11CBaseServer11GetNetStatsERfS0_
Decompiled
undefined (3 params)
/* CBaseServer::GetNetStats(float&, float&) */
void __thiscall CBaseServer::GetNetStats(CBaseServer *this,float *param_1,float *param_2)
{
char cVar1;
int *piVar2;
int iVar3;
longdouble lVar4;
iVar3 = 0;
*param_2 = 0.0;
*param_1 = 0.0;
if (0 < *(int *)(this + 0x120)) {
do {
while( true ) {
piVar2 = *(int **)(*(int *)(this + 0x114) + iVar3 * 4);
cVar1 = (**(code **)(*piVar2 + 0x78))(piVar2);
if ((cVar1 == '\0') && (cVar1 = (**(code **)(*piVar2 + 0x6c))(piVar2), cVar1 != '\0'))
break;
iVar3 = iVar3 + 1;
if (*(int *)(this + 0x120) <= iVar3) {
return;
}
}
iVar3 = iVar3 + 1;
piVar2 = (int *)(**(code **)(*piVar2 + 0x20))(piVar2);
lVar4 = (longdouble)(**(code **)(*piVar2 + 0x34))(piVar2,1);
*param_1 = (float)lVar4 + *param_1;
lVar4 = (longdouble)(**(code **)(*piVar2 + 0x34))(piVar2,0);
*param_2 = (float)lVar4 + *param_2;
} while (iVar3 < *(int *)(this + 0x120));
}
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.