CConnectionlessLanMgr::ProcessConnectionlessPacket
0x00059010 · 167 bytes · __thiscall
_ZN21CConnectionlessLanMgr27ProcessConnectionlessPacketEP11netpacket_s
Decompiled
undefined (2 params)
/* CConnectionlessLanMgr::ProcessConnectionlessPacket(netpacket_s*) */
undefined4 __thiscall
CConnectionlessLanMgr::ProcessConnectionlessPacket(CConnectionlessLanMgr *this,netpacket_s *param_1)
{
KeyValues *pKVar1;
KeyValues *this_00;
char *pcVar2;
netpacket_s *pnVar3;
pnVar3 = param_1;
pKVar1 = (KeyValues *)UnpackPacket(this,param_1);
if (pKVar1 != (KeyValues *)0x0) {
this_00 = KeyValues::operator_new((KeyValues *)0x2c,(uint)pnVar3);
/* try { // try from 0005905a to 0005905e has its CatchHandler @ 000590ba */
KeyValues::KeyValues(this_00,"OnNetLanConnectionlessPacket",(IKeyValuesSystem *)0x0,false);
pcVar2 = (char *)netadr_s::ToString((netadr_s *)param_1,false);
KeyValues::SetString(this_00,"from",pcVar2);
KeyValues::AddSubKey(this_00,pKVar1);
(**(code **)(*(int *)g_pMatchEventsSubscription + 8))(g_pMatchEventsSubscription,this_00);
return 1;
}
return 0;
}
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.