set priority with owner stats

This commit is contained in:
Kyle
2020-12-21 14:16:46 +08:00
parent 90f8323ddc
commit 403d224db3
+7 -6
View File
@@ -113,6 +113,13 @@ void TransmitManager::Hook_SetTransmit(CCheckTransmitInfo* pInfo, bool bAlways)
}
}
// if we need block it with owner stats = trasmit
if (!g_Hooked[entity]->CanSee(client))
{
// blocked
RETURN_META(MRES_SUPERCEDE);
}
auto owner = g_Hooked[entity]->GetOwner();
if (owner == client)
{
@@ -120,12 +127,6 @@ void TransmitManager::Hook_SetTransmit(CCheckTransmitInfo* pInfo, bool bAlways)
RETURN_META(MRES_IGNORED);
}
if (!g_Hooked[entity]->CanSee(client))
{
// blocked
RETURN_META(MRES_SUPERCEDE);
}
if (IsEntityIndexInRange(owner) && !g_Hooked[owner]->CanSee(client))
{
// blocked