From b209d92a2af70e5c91cc16747da0580c1e17e536 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 12 Sep 2004 00:20:00 +0000 Subject: [PATCH] Fixed bug noted by JJKiller --- dlls/engine/engine.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/engine/engine.cpp b/dlls/engine/engine.cpp index b32175ef..e6a5a7e2 100755 --- a/dlls/engine/engine.cpp +++ b/dlls/engine/engine.cpp @@ -325,7 +325,7 @@ static cell AMX_NATIVE_CALL set_speak(AMX *amx, cell *params) { int iIndex = params[1]; int iNewSpeakFlags = params[2]; - if (iIndex> 32 || !is_ent_valid(iIndex)) { + if (iIndex> gpGlobals->maxClients || !is_ent_valid(iIndex)) { EngineError(amx, "Invalid player %d", iIndex); return 0; } @@ -338,7 +338,7 @@ static cell AMX_NATIVE_CALL set_speak(AMX *amx, cell *params) { static cell AMX_NATIVE_CALL get_speak(AMX *amx, cell *params) { int iIndex = params[1]; - if (!is_ent_valid(iIndex) || iIndex > 32) { + if (!is_ent_valid(iIndex) || iIndex > gpGlobals->maxClients) { EngineError(amx, "Invalid player %d", iIndex); return 0; } @@ -409,7 +409,7 @@ static cell AMX_NATIVE_CALL attach_view(AMX *amx, cell *params) int iIndex = params[1]; int iTargetIndex = params[2]; - if (iIndex > 32 || !is_ent_valid(iIndex)) { + if (iIndex > gpGlobals->maxClients || !is_ent_valid(iIndex)) { EngineError(amx, "Invalid player %d", iIndex); return 0; } @@ -431,7 +431,7 @@ static cell AMX_NATIVE_CALL set_view(AMX *amx, cell *params) { int iIndex = params[1]; int iCameraType = params[2]; - if (iIndex > 32 || !is_ent_valid(iIndex)) { + if (iIndex > gpGlobals->maxClients || !is_ent_valid(iIndex)) { EngineError(amx, "Invalid player %d", iIndex); return 0; }