NET_AddToLagged
0x001c34a0 · 231 bytes · __cdecl
_Z15NET_AddToLaggedPP11netpacket_sS0_
Decompiled
undefined (2 params)
/* NET_AddToLagged(netpacket_s**, netpacket_s*) */
void NET_AddToLagged(netpacket_s **param_1,netpacket_s *param_2)
{
netadr_s *this;
void *pvVar1;
int iVar2;
netpacket_s *pnVar3;
netpacket_s *pnVar4;
netadr_s *pnVar5;
byte bVar6;
bVar6 = 0;
if (*(int *)(param_2 + 0x4c) == 0) {
this = operator_new(0x50);
/* try { // try from 001c34ec to 001c3510 has its CatchHandler @ 001c358f */
netadr_s::SetIP(this,0);
netadr_s::SetPort(this,0);
netadr_s::SetType(this,3);
this[0x20] = (netadr_s)0x0;
*(undefined4 *)(this + 0x1c) = 0;
*(undefined4 *)(this + 0x24) = 0xffffffff;
*(undefined4 *)(this + 0x28) = 0;
pnVar4 = param_2;
pnVar5 = this;
for (iVar2 = 0x14; iVar2 != 0; iVar2 = iVar2 + -1) {
*(undefined4 *)pnVar5 = *(undefined4 *)pnVar4;
pnVar4 = pnVar4 + (uint)bVar6 * -8 + 4;
pnVar5 = pnVar5 + (uint)bVar6 * -8 + 4;
}
pvVar1 = operator_new__(*(uint *)(param_2 + 0x40));
*(void **)(this + 0x18) = pvVar1;
_V_memcpy(pvVar1,*(void **)(param_2 + 0x18),*(int *)(param_2 + 0x40));
*(undefined4 *)(this + 0x4c) = 0;
pnVar4 = *param_1;
if (*param_1 == (netpacket_s *)0x0) {
*param_1 = (netpacket_s *)this;
}
else {
do {
pnVar3 = pnVar4;
pnVar4 = *(netpacket_s **)(pnVar3 + 0x4c);
} while (pnVar4 != (netpacket_s *)0x0);
*(netadr_s **)(pnVar3 + 0x4c) = this;
}
return;
}
Msg();
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.