NET_DiscardStaleSplitpackets
0x001c3930 · 190 bytes · __cdecl
_Z28NET_DiscardStaleSplitpacketsi
Decompiled
undefined (1 param)
/* NET_DiscardStaleSplitpackets(int) */
void NET_DiscardStaleSplitpackets(int param_1)
{
int iVar1;
int *piVar2;
void *pvVar3;
int iVar4;
int iVar5;
int iVar6;
int local_24;
piVar2 = (int *)(net_splitpackets + param_1 * 0x14);
iVar6 = piVar2[3] + -1;
if (-1 < iVar6) {
iVar5 = piVar2[3] * 0x38120;
do {
while( true ) {
iVar1 = iVar5 + -0x38120;
pvVar3 = (void *)(*piVar2 + iVar1);
if (net_time < (double)(*(float *)((int)pvVar3 + 0x3811c) + 15.0)) break;
local_24 = piVar2[3];
iVar4 = (local_24 - iVar6) + -1;
if (0 < iVar4) {
_V_memmove(pvVar3,(void *)(iVar5 + *piVar2),iVar4 * 0x38120);
local_24 = piVar2[3];
}
iVar6 = iVar6 + -1;
piVar2[3] = local_24 + -1;
iVar5 = iVar1;
if (iVar6 == -1) {
return;
}
}
iVar6 = iVar6 + -1;
iVar5 = iVar1;
} while (iVar6 != -1);
}
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.