CBaseAbility::ShouldTransmit
0x004d1ca0 · 253 bytes · __thiscall
_ZN12CBaseAbility14ShouldTransmitEPK18CCheckTransmitInfo
Decompiled
undefined (2 params)
/* CBaseAbility::ShouldTransmit(CCheckTransmitInfo const*) */
undefined4 __thiscall CBaseAbility::ShouldTransmit(CBaseAbility *this,CCheckTransmitInfo *param_1)
{
uint uVar1;
CBasePlayer *this_00;
int *piVar2;
char cVar3;
byte *pbVar4;
CBaseEntity *pCVar5;
int iVar6;
int iVar7;
undefined *puVar8;
uVar1 = *(uint *)(this + 0x44c);
if ((((uVar1 == 0xffffffff) ||
(puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar8 + 8) != uVar1 >> 0xc)) ||
(this_00 = *(CBasePlayer **)(puVar8 + 4), this_00 == (CBasePlayer *)0x0)) {
return 0x10;
}
if ((*(edict_t **)param_1 == *(edict_t **)(this_00 + 0x30)) ||
(cVar3 = CBasePlayer::IsSplitScreenUserOnEdict(this_00,*(edict_t **)param_1), cVar3 != '\0')) {
return 8;
}
pbVar4 = *(byte **)param_1;
if (((pbVar4 != (byte *)0x0) ||
((pbVar4 = *(byte **)(gpGlobals + 0x58), pbVar4 != (byte *)0x0 && ((*pbVar4 & 2) == 0)))) &&
((piVar2 = *(int **)(pbVar4 + 0xc), piVar2 != (int *)0x0 &&
(pCVar5 = (CBaseEntity *)(**(code **)(*piVar2 + 0x18))(piVar2), pCVar5 != (CBaseEntity *)0x0))
)) {
iVar6 = CBaseEntity::GetTeamNumber(pCVar5);
uVar1 = *(uint *)(this + 0x44c);
pCVar5 = (CBaseEntity *)0x0;
if (((uVar1 != 0xffffffff) &&
(puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar8 + 8) == uVar1 >> 0xc)) {
pCVar5 = *(CBaseEntity **)(puVar8 + 4);
}
iVar7 = CBaseEntity::GetTeamNumber(pCVar5);
if (iVar6 == iVar7) {
return 8;
}
}
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.