From c925c50667e1d6548f2dffb5d5f62e2520ba4872 Mon Sep 17 00:00:00 2001 From: Kyle Date: Tue, 11 Aug 2020 13:26:37 +0800 Subject: [PATCH] remove owner check --- extension.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/extension.cpp b/extension.cpp index 068a256..042b0cb 100644 --- a/extension.cpp +++ b/extension.cpp @@ -128,7 +128,7 @@ void TransmitManager::Hook_SetTransmit(CCheckTransmitInfo* pInfo, bool bAlways) RETURN_META(MRES_SUPERCEDE); } - if (owner > 0 && !g_Hooked[owner]->CanSee(client)) + if (IsEntityIndexInRange(owner) && !g_Hooked[owner]->CanSee(client)) { // blocked RETURN_META(MRES_SUPERCEDE); @@ -292,12 +292,6 @@ static cell_t Native_SetEntityOwner(IPluginContext* pContext, const cell_t* para return pContext->ThrowNativeError("Entity %d is out-of-range.", params[1]); } - if (!(params[2] >= 1 && params[2] < MAX_EDICT)) - { - // out-of-range - return pContext->ThrowNativeError("Owner %d is out-of-range.", params[2]); - } - if (g_Hooked[params[1]] != nullptr) { g_Hooked[params[1]]->SetOwner(params[2]);