CNetSupportImpl::SendPacket
0x001c1bb0 · 184 bytes · __thiscall
_ZN15CNetSupportImpl10SendPacketEP11INetChanneliRK8netadr_sPKviP8bf_writeb
Decompiled
undefined (8 params)
/* CNetSupportImpl::SendPacket(INetChannel*, int, netadr_s const&, void const*, int, bf_write*,
bool) */
void __thiscall
CNetSupportImpl::SendPacket
(CNetSupportImpl *this,INetChannel *param_1,int param_2,netadr_s *param_3,void *param_4,
int param_5,bf_write *param_6,bool param_7)
{
short sVar1;
int iVar2;
int in_GS_OFFSET;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
local_2c = *(undefined4 *)param_3;
local_28 = *(undefined4 *)(param_3 + 4);
local_24 = *(undefined4 *)(param_3 + 8);
sVar1 = netadr_s::GetPort((netadr_s *)&local_2c);
if (sVar1 == 0) {
iVar2 = netadr_s::GetType((netadr_s *)&local_2c);
if (iVar2 == 2) {
netadr_s::SetPort((netadr_s *)&local_2c,0x6987);
}
}
NET_SendPacket(param_1,param_2,(netadr_s *)&local_2c,param_4,param_5,param_6,param_7,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.