CNetChan::FlowNewPacket
0x001af670 · 523 bytes · __thiscall
_ZN8CNetChan13FlowNewPacketEiiiiii
Decompiled
undefined (7 params)
/* CNetChan::FlowNewPacket(int, int, int, int, int, int) */
void __thiscall
CNetChan::FlowNewPacket
(CNetChan *this,int param_1,int param_2,int param_3,int param_4,int param_5,int param_6)
{
uint uVar1;
int iVar2;
int iVar3;
int iVar4;
CNetChan *pCVar5;
uint uVar6;
longdouble lVar7;
float fVar8;
int local_2c;
pCVar5 = (CNetChan *)0x0;
iVar3 = param_1 * 0x1e2c;
uVar1 = *(uint *)(this + iVar3 + 0x570);
if ((int)uVar1 < param_2) {
uVar6 = uVar1 + 1;
if ((int)uVar6 <= param_2) {
local_2c = 0;
iVar4 = ~uVar1 + param_2;
do {
iVar2 = (uVar6 & 0x7f) * 0x3c + iVar3 + 0x56c;
pCVar5 = this + iVar2 + 8;
*(float *)(this + iVar2 + 8) = (float)net_time;
this[iVar2 + 0x40] = (CNetChan)0x0;
*(undefined4 *)(this + iVar2 + 0xc) = 0;
*(undefined4 *)(this + iVar2 + 0x18) = 0xbf800000;
lVar7 = (longdouble)(**(code **)(*(int *)this + 0x28))(this,0);
*(undefined4 *)(this + iVar2 + 0x10) = 0;
*(undefined4 *)(this + iVar2 + 0x14) = 0;
*(undefined4 *)(this + iVar2 + 0x20) = 0;
*(float *)(this + iVar2 + 0x1c) = (float)lVar7;
_V_memset(this + iVar2 + 0x24,0,0x1c);
if (iVar4 < param_4 + param_5) {
if (iVar4 < param_4) {
*(undefined4 *)(this + iVar2 + 0x10) = 1;
}
else {
*(undefined4 *)(this + iVar2 + 0x14) = 1;
}
}
if (param_2 < (int)(uVar6 + 1)) break;
local_2c = local_2c + 1;
iVar4 = iVar4 + -1;
uVar6 = uVar6 + 1;
} while (local_2c < 0x80);
}
pCVar5[0x38] = (CNetChan)0x1;
*(int *)(pCVar5 + 0xc) = param_5;
*(int *)(pCVar5 + 8) = param_4;
*(int *)(pCVar5 + 4) = param_6;
lVar7 = (longdouble)(**(code **)(*(int *)this + 0x28))(this,0);
*(float *)(pCVar5 + 0x14) = (float)lVar7;
*(undefined4 *)(pCVar5 + 0x18) = *(undefined4 *)(this + 0x4228);
}
*(int *)(this + iVar3 + 0x568) = *(int *)(this + iVar3 + 0x568) + 1;
*(CNetChan **)(this + iVar3 + 0x2374) = pCVar5;
*(int *)(this + iVar3 + 0x570) = param_2;
iVar3 = (uint)(param_1 == 0) * 0x1e2c;
if (((*(int *)(this + iVar3 + 0x570) + -0x7f <= param_3) &&
(iVar3 = iVar3 + 0x560 + (param_3 & 0x7fU) * 0x3c, this[iVar3 + 0x4c] != (CNetChan)0x0)) &&
(*(float *)(this + iVar3 + 0x24) == -1.0)) {
fVar8 = (float)(net_time - (double)*(float *)(this + iVar3 + 0x14));
if (fVar8 <= 0.0) {
fVar8 = 0.0;
}
*(float *)(this + iVar3 + 0x24) = fVar8;
}
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.