CServerNetworkProperty::IsInPVS
0x008215b0 · 468 bytes · __thiscall
_ZN22CServerNetworkProperty7IsInPVSEPK18CCheckTransmitInfo
Decompiled
undefined (2 params)
/* CServerNetworkProperty::IsInPVS(CCheckTransmitInfo const*) */
bool __thiscall
CServerNetworkProperty::IsInPVS(CServerNetworkProperty *this,CCheckTransmitInfo *param_1)
{
ushort *puVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
iVar3 = *(int *)(param_1 + 0x2010);
if (*(short *)(this + 0x1a) == 0) {
if (iVar3 < 1) goto LAB_00821750;
iVar5 = 0;
iVar2 = (int)*(short *)(this + 0x18);
iVar4 = *(int *)(param_1 + 0x2014);
if (iVar2 != iVar4) {
do {
iVar3 = (**(code **)(*engine + 0x100))(engine,iVar4,iVar2);
if (iVar3 != 0) goto LAB_00821678;
iVar5 = iVar5 + 1;
iVar3 = *(int *)(param_1 + 0x2010);
if (iVar3 <= iVar5) break;
iVar2 = (int)*(short *)(this + 0x18);
iVar4 = *(int *)(param_1 + iVar5 * 4 + 0x2014);
} while (iVar2 != iVar4);
}
}
else if (iVar3 < 1) {
LAB_00821750:
iVar5 = 0;
}
else {
iVar4 = *(int *)(param_1 + 0x2014);
iVar2 = (int)*(short *)(this + 0x18);
if ((iVar2 == iVar4) || (*(short *)(this + 0x1a) == iVar4)) goto LAB_008216b0;
iVar5 = 0;
while( true ) {
iVar3 = (**(code **)(*engine + 0x100))(engine,iVar4,iVar2);
if ((iVar3 != 0) ||
(iVar3 = (**(code **)(*engine + 0x100))(engine,iVar4,(int)*(short *)(this + 0x1a)),
iVar3 != 0)) goto LAB_00821678;
iVar5 = iVar5 + 1;
iVar3 = *(int *)(param_1 + 0x2010);
if (iVar3 <= iVar5) break;
iVar4 = *(int *)(param_1 + iVar5 * 4 + 0x2014);
iVar2 = (int)*(short *)(this + 0x18);
if ((iVar2 == iVar4) || (*(short *)(this + 0x1a) == iVar4)) break;
}
}
if (iVar3 == iVar5) {
return false;
}
LAB_008216b0:
iVar4 = *(short *)(this + 0x12) + -1;
iVar3 = iVar4 * 2;
if (*(short *)(this + 0x12) < 0) {
iVar3 = (**(code **)(*engine + 0xfc))
(engine,(int)*(short *)(this + 0x10),param_1 + 4,
*(undefined4 *)(param_1 + 0x2004));
return iVar3 != 0;
}
while( true ) {
if (iVar4 == -1) {
return false;
}
puVar1 = (ushort *)(*(int *)(this + 0x14) + iVar3);
iVar3 = iVar3 + -2;
if (((byte)(param_1 + 4)[(int)(uint)*puVar1 >> 3] >> (*puVar1 & 7) & 1) != 0) break;
iVar4 = iVar4 + -1;
}
return true;
LAB_00821678:
if (*(int *)(param_1 + 0x2010) == iVar5) {
return false;
}
goto LAB_008216b0;
}
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.