From 85963cafe7d9854cf61afa83f079e501c33e35ec Mon Sep 17 00:00:00 2001 From: Eric Minekus Date: Fri, 2 Oct 2009 02:26:11 -0700 Subject: [PATCH] Fixed several plugins excluding the last client from loops (bug 3984, r=dvander). --- plugins/basechat.sp | 2 +- plugins/funcommands/fire.sp | 2 +- plugins/funcommands/ice.sp | 4 ++-- plugins/funcommands/timebomb.sp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/basechat.sp b/plugins/basechat.sp index 63efb520..935ebfcf 100644 --- a/plugins/basechat.sp +++ b/plugins/basechat.sp @@ -434,7 +434,7 @@ DisplayCenterTextToAll(client, String:message[]) { new String:nameBuf[MAX_NAME_LENGTH]; - for (new i = 1; i < MaxClients; i++) + for (new i = 1; i <= MaxClients; i++) { if (!IsClientInGame(i) || IsFakeClient(i)) { diff --git a/plugins/funcommands/fire.sp b/plugins/funcommands/fire.sp index 5179a5a1..683bf3fd 100644 --- a/plugins/funcommands/fire.sp +++ b/plugins/funcommands/fire.sp @@ -164,7 +164,7 @@ public Action:Timer_FireBomb(Handle:timer, any:value) new teamOnly = ((GetConVarInt(g_Cvar_FireBombMode) == 1) ? true : false); new maxClients = GetMaxClients(); - for (new i = 1; i < maxClients; i++) + for (new i = 1; i <= maxClients; i++) { if (!IsClientInGame(i) || !IsPlayerAlive(i) || i == client) { diff --git a/plugins/funcommands/ice.sp b/plugins/funcommands/ice.sp index fd48871c..54b0d37d 100644 --- a/plugins/funcommands/ice.sp +++ b/plugins/funcommands/ice.sp @@ -107,7 +107,7 @@ KillAllFreezes( ) { new maxclients = GetMaxClients( ); - for(new i = 1; i < maxclients; i++) + for(new i = 1; i <= maxclients; i++) { if (g_FreezeSerial[i] != 0) { @@ -256,7 +256,7 @@ public Action:Timer_FreezeBomb(Handle:timer, any:value) new bool:teamOnly = ((GetConVarInt(g_Cvar_FreezeBombMode) == 1) ? true : false); new maxClients = GetMaxClients( ); - for (new i = 1; i < maxClients; i++) + for (new i = 1; i <= maxClients; i++) { if (!IsClientInGame(i) || !IsPlayerAlive(i) || i == client) { diff --git a/plugins/funcommands/timebomb.sp b/plugins/funcommands/timebomb.sp index 7e7adfe4..29e3c1f8 100644 --- a/plugins/funcommands/timebomb.sp +++ b/plugins/funcommands/timebomb.sp @@ -143,7 +143,7 @@ public Action:Timer_TimeBomb(Handle:timer, any:value) new teamOnly = ((GetConVarInt(g_Cvar_TimeBombMode) == 1) ? true : false); new maxClients = GetMaxClients(); - for (new i = 1; i < maxClients; i++) + for (new i = 1; i <= maxClients; i++) { if (!IsClientInGame(i) || !IsPlayerAlive(i) || i == client) {