CSendProxyRecipients::SetOnly
0x00820440 · 368 bytes · __thiscall
_ZN20CSendProxyRecipients7SetOnlyEi
Decompiled
undefined (2 params)
/* CSendProxyRecipients::SetOnly(int) */
void __thiscall CSendProxyRecipients::SetOnly(CSendProxyRecipients *this,int param_1)
{
byte *pbVar1;
uint uVar2;
int iVar3;
char cVar4;
CBasePlayer *this_00;
int *piVar5;
byte *pbVar6;
int iVar7;
undefined *puVar8;
if (this != (CSendProxyRecipients *)0x0) {
*(undefined4 *)this = 0;
}
*(uint *)this = *(uint *)this | 1 << ((byte)param_1 & 0x1f);
pbVar1 = *(byte **)(gpGlobals + 0x58);
if (param_1 + 1U < 0x800) {
if (pbVar1 == (byte *)0x0) {
return;
}
pbVar6 = pbVar1 + (param_1 + 1U) * 0x10;
if ((pbVar1[(param_1 + 1U) * 0x10] & 2) == 0) goto LAB_0082048f;
}
else if (pbVar1 == (byte *)0x0) {
return;
}
pbVar6 = pbVar1;
if ((*pbVar1 & 2) != 0) {
return;
}
LAB_0082048f:
piVar5 = *(int **)(pbVar6 + 0xc);
if (((piVar5 != (int *)0x0) &&
(this_00 = (CBasePlayer *)(**(code **)(*piVar5 + 0x18))(piVar5), this_00 != (CBasePlayer *)0x0
)) && (cVar4 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), cVar4 != '\0')) {
cVar4 = CBasePlayer::IsSplitScreenPlayer(this_00);
if (cVar4 == '\0') {
piVar5 = (int *)CBasePlayer::GetSplitScreenPlayers(this_00);
if (0 < piVar5[3]) {
iVar7 = 0;
do {
while (((uVar2 = *(uint *)(*piVar5 + iVar7 * 4), uVar2 != 0xffffffff &&
(puVar8 = g_pEntityList + (uVar2 & 0xfff) * 0x10,
puVar8 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar8 + 8) == uVar2 >> 0xc && (*(int *)(puVar8 + 4) != 0))))) {
iVar3 = *(int *)(*(int *)(puVar8 + 4) + 0x30);
if (iVar3 == 0) {
*(uint *)this = *(uint *)this | 0x80000000;
}
else {
*(uint *)this =
*(uint *)this |
1 << ((char)(iVar3 - *(int *)(gpGlobals + 0x58) >> 4) - 1U & 0x1f);
}
iVar7 = iVar7 + 1;
if (piVar5[3] <= iVar7) {
return;
}
}
iVar7 = iVar7 + 1;
} while (iVar7 < piVar5[3]);
}
}
else {
iVar7 = CBasePlayer::GetSplitScreenPlayerOwner(this_00);
if (iVar7 != 0) {
iVar7 = CBasePlayer::GetSplitScreenPlayerOwner(this_00);
if (*(int *)(iVar7 + 0x30) == 0) {
*(uint *)this = *(uint *)this | 0x80000000;
}
else {
*(uint *)this =
*(uint *)this |
1 << ((char)(*(int *)(iVar7 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4) - 1U & 0x1f);
}
return;
}
}
}
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.