CNetChan::UpdateSubChannels
0x001b0a90 · 304 bytes · __thiscall
_ZN8CNetChan17UpdateSubChannelsEv
Decompiled
undefined (1 param)
/* CNetChan::UpdateSubChannels() */
void __thiscall CNetChan::UpdateSubChannels(CNetChan *this)
{
int iVar1;
bool bVar2;
int iVar3;
CNetChan *pCVar4;
uint uVar5;
CNetChan *pCVar6;
int iVar7;
CNetChan *pCVar8;
uint uVar9;
uint local_18;
iVar3 = 0;
pCVar6 = this;
while (*(int *)(pCVar6 + 0x358) != 0) {
iVar3 = iVar3 + 1;
pCVar6 = pCVar6 + 0x1c;
if (iVar3 == 8) {
return;
}
}
iVar7 = 0;
pCVar6 = this + iVar3 * 0x1c + 0x344;
bVar2 = false;
local_18 = *(uint *)(this + 0x94) >> 8;
pCVar4 = this + 0xbc;
pCVar8 = pCVar6;
do {
if ((0 < *(int *)(pCVar4 + 0xc)) && (iVar3 = **(int **)pCVar4, *(char *)(iVar3 + 0x120) == '\0')
) {
iVar1 = *(int *)(iVar3 + 0x128) + *(int *)(iVar3 + 300);
if (*(int *)(iVar3 + 0x124) != iVar1) {
uVar9 = *(int *)(iVar3 + 0x124) - iVar1;
if ((int)local_18 <= (int)uVar9) {
uVar9 = local_18;
}
if (((iVar7 == 1) && (this[0x428] != (CNetChan)0x0)) && (0 < (int)uVar9)) {
uVar9 = 1;
}
*(uint *)(pCVar8 + 8) = uVar9;
local_18 = local_18 - uVar9;
*(int *)pCVar8 = iVar1;
*(int *)(iVar3 + 300) = *(int *)(iVar3 + 300) + uVar9;
if ((int)local_18 < 1) goto LAB_001b0b65;
bVar2 = true;
}
}
iVar7 = iVar7 + 1;
pCVar4 = pCVar4 + 0x14;
pCVar8 = pCVar8 + 4;
} while (iVar7 != 2);
if (!bVar2) {
return;
}
LAB_001b0b65:
uVar9 = *(uint *)(this + 0x14);
uVar5 = 1 << ((byte)*(int *)(pCVar6 + 0x18) & 0x1f);
if ((uVar5 & uVar9) == 0) {
*(uint *)(this + 0x14) = uVar5 | uVar9;
}
else {
*(uint *)(this + 0x14) = ~uVar5 & uVar9;
}
*(int *)(pCVar6 + 0x14) = 1;
*(int *)(pCVar6 + 0x10) = 0;
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.