CBaseViewModel::ShouldTransmit
0x0062e480 · 593 bytes · __thiscall
_ZN14CBaseViewModel14ShouldTransmitEPK18CCheckTransmitInfo
Decompiled
undefined (2 params)
/* CBaseViewModel::ShouldTransmit(CCheckTransmitInfo const*) */
undefined4 __thiscall
CBaseViewModel::ShouldTransmit(CBaseViewModel *this,CCheckTransmitInfo *param_1)
{
uint uVar1;
char cVar2;
byte *pbVar3;
int *piVar4;
int iVar5;
CBasePlayer *pCVar6;
undefined4 uVar7;
undefined *puVar8;
int iVar9;
CBasePlayer *local_40;
CBasePlayer *local_38;
CBasePlayer *local_34;
int local_30 [8];
uVar1 = *(uint *)(this + 0x161c);
if ((((uVar1 == 0xffffffff) ||
(puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar8 + 8) != uVar1 >> 0xc)) ||
((local_40 = *(CBasePlayer **)(puVar8 + 4), local_40 == (CBasePlayer *)0x0 ||
(cVar2 = (**(code **)(*(int *)local_40 + 0x16c))(local_40), cVar2 == '\0')))) {
local_40 = (CBasePlayer *)0x0;
}
else if ((*(edict_t **)param_1 == *(edict_t **)(local_40 + 0x30)) ||
(cVar2 = CBasePlayer::IsSplitScreenUserOnEdict(local_40,*(edict_t **)param_1),
cVar2 != '\0')) {
return 8;
}
pbVar3 = *(byte **)param_1;
if (((pbVar3 != (byte *)0x0) ||
((pbVar3 = *(byte **)(gpGlobals + 0x58), pbVar3 != (byte *)0x0 && ((*pbVar3 & 2) == 0)))) &&
((piVar4 = *(int **)(pbVar3 + 0xc), piVar4 != (int *)0x0 &&
((local_38 = (CBasePlayer *)(**(code **)(*piVar4 + 0x18))(piVar4),
local_38 != (CBasePlayer *)0x0 &&
(cVar2 = (**(code **)(*(int *)local_38 + 0x16c))(local_38), cVar2 != '\0')))))) {
local_30[0] = 0;
local_30[1] = 0;
local_30[2] = 0;
local_30[3] = 0;
local_30[4] = 0;
/* try { // try from 0062e53c to 0062e57b has its CatchHandler @ 0062e6e7 */
CUtlVector<CBasePlayer*,CUtlMemory<CBasePlayer*,int>>::InsertBefore
((CUtlVector<CBasePlayer*,CUtlMemory<CBasePlayer*,int>> *)local_30,0,&local_38);
piVar4 = (int *)CBasePlayer::GetSplitScreenPlayers(local_38);
iVar9 = 0;
if (0 < piVar4[3]) {
do {
local_34 = (CBasePlayer *)0x0;
uVar1 = *(uint *)(*piVar4 + iVar9 * 4);
if (((uVar1 != 0xffffffff) &&
(puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar8 + 8) == uVar1 >> 0xc)) {
local_34 = *(CBasePlayer **)(puVar8 + 4);
}
CUtlVector<CBasePlayer*,CUtlMemory<CBasePlayer*,int>>::InsertBefore
((CUtlVector<CBasePlayer*,CUtlMemory<CBasePlayer*,int>> *)local_30,local_30[3],
&local_34);
iVar9 = iVar9 + 1;
} while (iVar9 < piVar4[3]);
}
if (0 < local_30[3]) {
iVar9 = 0;
do {
piVar4 = *(int **)(local_30[0] + iVar9 * 4);
if (piVar4 != (int *)0x0) {
if ((char)piVar4[0x729] != '\0') {
uVar7 = 0x20;
LAB_0062e690:
local_30[3] = 0;
CUtlMemory<CBasePlayer*,int>::Purge((CUtlMemory<CBasePlayer*,int> *)local_30);
local_30[4] = local_30[0];
CUtlMemory<CBasePlayer*,int>::Purge((CUtlMemory<CBasePlayer*,int> *)local_30);
return uVar7;
}
/* try { // try from 0062e670 to 0062e685 has its CatchHandler @ 0062e6e7 */
iVar5 = (**(code **)(*piVar4 + 0x648))(piVar4);
if ((iVar5 == 4) &&
(pCVar6 = (CBasePlayer *)(**(code **)(*piVar4 + 0x654))(piVar4), pCVar6 == local_40)) {
uVar7 = 8;
goto LAB_0062e690;
}
}
iVar9 = iVar9 + 1;
} while (iVar9 < local_30[3]);
}
local_30[3] = 0;
CUtlMemory<CBasePlayer*,int>::Purge((CUtlMemory<CBasePlayer*,int> *)local_30);
local_30[4] = local_30[0];
CUtlMemory<CBasePlayer*,int>::Purge((CUtlMemory<CBasePlayer*,int> *)local_30);
}
return 0x10;
}
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.