CMatchVoice::IsMachineMutingLocalTalkers
0x0005d750 · 1161 bytes · __cdecl
_ZN11CMatchVoice27IsMachineMutingLocalTalkersEy
Decompiled
undefined (1 param)
/* CMatchVoice::IsMachineMutingLocalTalkers(unsigned long long) */
undefined4 CMatchVoice::IsMachineMutingLocalTalkers(ulonglong param_1)
{
int *piVar1;
KeyValues *pKVar2;
KeyValues *pKVar3;
int iVar4;
KeyValues *this;
int iVar5;
char *pcVar6;
undefined4 *puVar7;
int iVar8;
int in_GS_OFFSET;
undefined8 uVar9;
longlong lVar10;
longlong lVar11;
int in_stack_0000000c;
undefined4 uVar12;
undefined4 uVar13;
int local_144;
KeyValues *local_140;
CFmtStrN<256> local_12c [5];
char local_127 [263];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
piVar1 = (int *)(**(code **)(*g_pMatchFramework + 0x24))(g_pMatchFramework);
if ((((piVar1 != (int *)0x0) &&
(pKVar2 = (KeyValues *)(**(code **)(*piVar1 + 4))(piVar1), pKVar2 != (KeyValues *)0x0)) &&
(pKVar3 = (KeyValues *)KeyValues::FindKey(pKVar2,"Members",false), pKVar3 != (KeyValues *)0x0)
) && (iVar4 = KeyValues::GetInt(pKVar3,"numMachines",0), 0 < iVar4)) {
local_140 = (KeyValues *)0x0;
do {
CFmtStrN<256>::CFmtStrN(local_12c,"machine%d",local_140);
this = (KeyValues *)KeyValues::FindKey(pKVar3,local_127,false);
if ((this != (KeyValues *)0x0) && (iVar5 = KeyValues::GetInt(this,"numPlayers",0), 0 < iVar5))
{
iVar8 = 0;
do {
CFmtStrN<256>::CFmtStrN(local_12c,"player%d",iVar8);
pcVar6 = (char *)KeyValues::FindKey(this,local_127,false);
if (pcVar6 != (char *)0x0) {
uVar12 = 0;
uVar13 = 0;
uVar9 = KeyValues::GetUint64(pcVar6,0xb4d28);
if ((int)((ulonglong)uVar9 >> 0x20) == in_stack_0000000c && (int)uVar9 == param_1._4_4_)
{
puVar7 = (undefined4 *)
(**(code **)(*g_pPlayerManager + 4))(g_pPlayerManager,0,uVar12,uVar13);
lVar10 = (**(code **)*puVar7)(puVar7);
pKVar2 = (KeyValues *)KeyValues::FindKey(pKVar2,"Members",false);
if ((pKVar2 == (KeyValues *)0x0) ||
(iVar4 = KeyValues::GetInt(pKVar2,"numMachines",0), iVar4 < 1)) goto LAB_0005d900;
local_144 = 0;
goto LAB_0005d9a6;
}
}
iVar8 = iVar8 + 1;
} while (iVar8 != iVar5);
}
local_140 = (KeyValues *)((int)local_140 + 1);
} while (local_140 != (KeyValues *)iVar4);
}
goto LAB_0005d900;
LAB_0005d9a6:
do {
CFmtStrN<256>::CFmtStrN(local_12c,"machine%d",local_144,uVar13);
pKVar3 = (KeyValues *)KeyValues::FindKey(pKVar2,local_127,false);
if ((pKVar3 != (KeyValues *)0x0) &&
(iVar5 = KeyValues::GetInt(pKVar3,"numPlayers",0), 0 < iVar5)) {
iVar8 = 0;
do {
CFmtStrN<256>::CFmtStrN(local_12c,"player%d",iVar8,uVar13);
pcVar6 = (char *)KeyValues::FindKey(pKVar3,local_127,false);
if (pcVar6 != (char *)0x0) {
uVar13 = 0;
lVar11 = KeyValues::GetUint64(pcVar6,0xb4d28);
if (lVar10 == lVar11) {
if (this == pKVar3) goto LAB_0005d900;
iVar4 = KeyValues::GetInt(pKVar3,"numPlayers",0);
pKVar2 = (KeyValues *)KeyValues::FindKey(this,"Mutelist",false);
if ((pKVar2 == (KeyValues *)0x0) ||
(local_140 = (KeyValues *)KeyValues::GetFirstValue(pKVar2),
local_140 == (KeyValues *)0x0)) goto LAB_0005d900;
goto LAB_0005db1a;
}
}
iVar8 = iVar8 + 1;
} while (iVar8 != iVar5);
}
local_144 = local_144 + 1;
} while (local_144 != iVar4);
goto LAB_0005d900;
LAB_0005db1a:
do {
uVar12 = 0;
lVar10 = KeyValues::GetUint64((char *)local_140,0);
if ((lVar10 != 0) && (0 < iVar4)) {
iVar5 = 0;
do {
CFmtStrN<256>::CFmtStrN(local_12c,"player%d/xuid",iVar5,uVar12);
uVar12 = 0;
lVar11 = KeyValues::GetUint64((char *)pKVar3,ZEXT48(local_127));
if (lVar11 == lVar10) {
uVar12 = 1;
goto LAB_0005d902;
}
iVar5 = iVar5 + 1;
} while (iVar5 != iVar4);
}
local_140 = (KeyValues *)KeyValues::GetNextValue(local_140);
} while (local_140 != (KeyValues *)0x0);
LAB_0005d900:
uVar12 = 0;
LAB_0005d902:
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar12;
}
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.