CVoiceServer::SetClientListening
0x0022e2f0 · 91 bytes · __thiscall
_ZN12CVoiceServer18SetClientListeningEiib
Decompiled
undefined (4 params)
/* CVoiceServer::SetClientListening(int, int, bool) */
undefined4 __thiscall
CVoiceServer::SetClientListening(CVoiceServer *this,int param_1,int param_2,bool param_3)
{
uint *puVar1;
undefined4 uVar2;
int iVar3;
uint uVar4;
int iVar5;
uVar2 = 0;
iVar3 = param_1 + -1;
if ((((-1 < iVar3) && (iVar3 < DAT_003b8080)) && (iVar5 = param_2 + -1, -1 < iVar5)) &&
(iVar5 < DAT_003b8080)) {
uVar4 = 1 << ((byte)iVar3 & 0x1f);
iVar3 = *(int *)(DAT_003b8074 + iVar5 * 4);
if (param_3) {
puVar1 = (uint *)((int)&__DT_REL[0x14c3].r_offset + iVar3);
*puVar1 = *puVar1 | uVar4;
return 1;
}
puVar1 = (uint *)((int)&__DT_REL[0x14c3].r_offset + iVar3);
*puVar1 = *puVar1 & ~uVar4;
uVar2 = 1;
}
return uVar2;
}
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.