CNetChan::GetStreamProgress
0x001ade00 · 152 bytes · __thiscall
_ZNK8CNetChan17GetStreamProgressEiPiS0_
Decompiled
undefined (4 params)
/* CNetChan::GetStreamProgress(int, int*, int*) const */
undefined4 __thiscall
CNetChan::GetStreamProgress(CNetChan *this,int param_1,int *param_2,int *param_3)
{
CNetChan *pCVar1;
int iVar2;
*param_3 = 0;
*param_2 = 0;
if (param_1 == 1) {
iVar2 = 2;
do {
if (*(int *)(this + 0x1ec) != 0) {
*param_3 = *param_3 + *(int *)(this + 0x208) * 0x100;
*param_2 = *param_2 + *(int *)(this + 0x20c) * 0x100;
}
this = this + 0x130;
iVar2 = iVar2 + -1;
} while (iVar2 != 0);
}
else {
if (param_1 != 0) {
return 0;
}
iVar2 = 2;
pCVar1 = this + 0xbc;
do {
if (0 < *(int *)(pCVar1 + 0xc)) {
*param_3 = *param_3 + *(int *)(**(int **)pCVar1 + 0x124) * 0x100;
*param_2 = *param_2 + *(int *)(**(int **)pCVar1 + 0x128) * 0x100;
}
pCVar1 = pCVar1 + 0x14;
iVar2 = iVar2 + -1;
} while (iVar2 != 0);
}
return CONCAT31((int3)((uint)*param_3 >> 8),0 < *param_3);
}
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.