CBaseServer::ForwardPacketsFromMasterServerUpdater
0x001091b0 · 276 bytes · __thiscall
_ZN11CBaseServer37ForwardPacketsFromMasterServerUpdaterEv
Decompiled
undefined (1 param)
/* CBaseServer::ForwardPacketsFromMasterServerUpdater() */
void __thiscall CBaseServer::ForwardPacketsFromMasterServerUpdater(CBaseServer *this)
{
int *piVar1;
ushort uVar2;
int iVar3;
int in_GS_OFFSET;
ushort local_4032;
uint local_4030;
netadr_s local_402c [12];
uchar local_4020 [16384];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar3 = Steam3Server();
piVar1 = *(int **)(iVar3 + 4);
if (piVar1 != (int *)0x0) {
while( true ) {
iVar3 = (**(code **)(*piVar1 + 0x8c))(piVar1,local_4020,0x4000,&local_4030,&local_4032);
uVar2 = local_4032;
if (iVar3 < 1) break;
netadr_s::SetIP(local_402c,local_4030);
netadr_s::SetPort(local_402c,uVar2);
netadr_s::SetType(local_402c,3);
NET_SendPacket((INetChannel *)0x0,*(int *)(this + 8),local_402c,local_4020,iVar3,
(bf_write *)0x0,false,0);
}
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.