CBasePlayer::ShouldTransmit
0x007b92d0 · 296 bytes · __thiscall
_ZN11CBasePlayer14ShouldTransmitEPK18CCheckTransmitInfo
Decompiled
undefined (2 params)
/* CBasePlayer::ShouldTransmit(CCheckTransmitInfo const*) */
undefined4 __thiscall CBasePlayer::ShouldTransmit(CBasePlayer *this,CCheckTransmitInfo *param_1)
{
int *piVar1;
char cVar2;
undefined4 uVar3;
int iVar4;
int iVar5;
byte *pbVar6;
if ((*(edict_t **)param_1 == *(edict_t **)(this + 0x30)) ||
(cVar2 = IsSplitScreenUserOnEdict(this,*(edict_t **)param_1), cVar2 != '\0')) {
uVar3 = 8;
}
else {
iVar4 = HLTVDirector();
if (*(int *)(this + 0x30) == 0) {
iVar5 = 0;
}
else {
iVar5 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
if (*(int *)(iVar4 + 0x1cc) == iVar5) {
pbVar6 = *(byte **)param_1;
if (((pbVar6 == (byte *)0x0) &&
((pbVar6 = *(byte **)(gpGlobals + 0x58), pbVar6 == (byte *)0x0 || ((*pbVar6 & 2) != 0))))
|| (piVar1 = *(int **)(pbVar6 + 0xc), piVar1 == (int *)0x0)) {
iVar4 = 0;
}
else {
iVar4 = (**(code **)(*piVar1 + 0x18))(piVar1);
}
if (*(char *)(iVar4 + 0x1ca4) != '\0') {
(**(code **)(*(int *)(this + 0x24) + 0x14))(this + 0x24);
return 8;
}
}
cVar2 = (**(code **)(*(int *)this + 300))(this);
if (((cVar2 == '\0') || (((byte)this[0xd4] & 0x20) == 0)) &&
((((byte)this[0x1d20] & 8) == 0 ||
(((*(float *)(gpGlobals + 0xc) - *(float *)(this + 0x1d5c) <= 0.5 ||
(this[0x104] != (CBasePlayer)0x2)) ||
(*(float *)(gpGlobals + 0xc) - *(float *)(this + 0x1d60) <= 0.5)))))) {
uVar3 = CBaseEntity::ShouldTransmit((CBaseEntity *)this,param_1);
return uVar3;
}
uVar3 = 0x10;
}
return uVar3;
}
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.