From a732205f8c478b3573e4735d2ef8e4261bcb2fab Mon Sep 17 00:00:00 2001 From: BotoX Date: Tue, 1 Mar 2016 23:36:47 +0100 Subject: [PATCH] properly fixed db0de91a18e4147125d2e36b458bf08bc5422959 added message when zombie cycle ended --- .../es/zombiereloaded.phrases.txt | 5 ++ .../no/zombiereloaded.phrases.txt | 5 ++ .../ru/zombiereloaded.phrases.txt | 5 ++ .../translations/zombiereloaded.phrases.txt | 5 ++ src/zr/infect.inc | 49 ++----------------- src/zr/zspawn.inc | 12 +++-- 6 files changed, 30 insertions(+), 51 deletions(-) diff --git a/cstrike/addons/sourcemod/translations/es/zombiereloaded.phrases.txt b/cstrike/addons/sourcemod/translations/es/zombiereloaded.phrases.txt index 6fb5e54..0e9990e 100644 --- a/cstrike/addons/sourcemod/translations/es/zombiereloaded.phrases.txt +++ b/cstrike/addons/sourcemod/translations/es/zombiereloaded.phrases.txt @@ -382,6 +382,11 @@ "es" "El ultimo zombi a dejado el juego, y te ha pasado la infeccion a ti. (luego se lo agradeces xD)" } + "Mother zombie infect cycle reset" + { + "es" "The mother zombie infection cycle has been reset." // TODO: Translate + } + // Center Text "Infect countdown" diff --git a/cstrike/addons/sourcemod/translations/no/zombiereloaded.phrases.txt b/cstrike/addons/sourcemod/translations/no/zombiereloaded.phrases.txt index 1fced81..f38c978 100644 --- a/cstrike/addons/sourcemod/translations/no/zombiereloaded.phrases.txt +++ b/cstrike/addons/sourcemod/translations/no/zombiereloaded.phrases.txt @@ -381,6 +381,11 @@ "no" "Den siste zombien har forlatt spillet. Du er blitt valgt som erstatning." } + "Mother zombie infect cycle reset" + { + "no" "The mother zombie infection cycle has been reset." // TODO: Translate + } + // Center Text "Infect countdown" diff --git a/cstrike/addons/sourcemod/translations/ru/zombiereloaded.phrases.txt b/cstrike/addons/sourcemod/translations/ru/zombiereloaded.phrases.txt index c23aeb4..a00c6d2 100644 --- a/cstrike/addons/sourcemod/translations/ru/zombiereloaded.phrases.txt +++ b/cstrike/addons/sourcemod/translations/ru/zombiereloaded.phrases.txt @@ -382,6 +382,11 @@ "ru" "Последний зомби покинул игру, поэтому вам досталась его инфекция." } + "Mother zombie infect cycle reset" + { + "ru" "The mother zombie infection cycle has been reset." // TODO: Translate + } + // Center Text "Infect countdown" diff --git a/cstrike/addons/sourcemod/translations/zombiereloaded.phrases.txt b/cstrike/addons/sourcemod/translations/zombiereloaded.phrases.txt index 6e4dfab..2f0d2db 100644 --- a/cstrike/addons/sourcemod/translations/zombiereloaded.phrases.txt +++ b/cstrike/addons/sourcemod/translations/zombiereloaded.phrases.txt @@ -398,6 +398,11 @@ "en" "The last zombie has left the game, and has passed the infection on to you." } + "Mother zombie infect cycle reset" + { + "en" "The mother zombie infection cycle has been reset." + } + // Center Text "Infect countdown" diff --git a/src/zr/infect.inc b/src/zr/infect.inc index 1f5a863..e2b98e0 100644 --- a/src/zr/infect.inc +++ b/src/zr/infect.inc @@ -581,6 +581,9 @@ public Action:InfectMotherZombie(Handle:timer) { g_InfectMotherStatus[client] = MotherStatus_None; } + + // Announce start of new cycle + TranslationPrintToChatAll(true, false, "Mother zombie infect cycle reset"); } // Remove MotherStatus_Last flag from all players. @@ -645,52 +648,6 @@ InfectMoveAllToCT() } } -/** - * Removes immune clients from a client list. If a client is removed, their - * immunity is also removed. - * - * @param clientList List of clients. - * @param keepLastPlayer Don't remove if there's only one player left. - * - * @return Number of clients remaining. - -InfectRemoveImmuneClients(Handle:clientList, bool:keepLastPlayer = true) -{ - new len = GetArraySize(clientList); - - // Loop though client list. - for (new i = 0; i < len; i++) - { - // Stop pruning if there is only one player left. - if (keepLastPlayer && len <= 1) - { - break; - } - - // Get client. - new client = GetArrayCell(clientList, i); - - // Check if client is immune from mother zombie infection. - if (bInfectImmune[client][INFECT_TYPE_MOTHER]) - { - // Take away immunity. - bInfectImmune[client][INFECT_TYPE_MOTHER] = false; - - // Remove client from array. - RemoveFromArray(clientList, i); - - // Update list size. - len--; - - // Backtrack one index, because we deleted it out from under the loop. - i--; - } - } - - return len; -} -*/ - /** * Timer callback, displays countdown to clients. * diff --git a/src/zr/zspawn.inc b/src/zr/zspawn.inc index 4c2bdbc..a94b622 100644 --- a/src/zr/zspawn.inc +++ b/src/zr/zspawn.inc @@ -207,6 +207,7 @@ ZSpawnOnRoundEnd() */ bool:ZSpawnClient(client, bool:force = false, bool:zombie = false) { + // If zspawn is disabled, then stop. new bool:zspawn = GetConVarBool(g_hCvarsList[CVAR_ZSPAWN]); if (!force && !zspawn) @@ -248,6 +249,7 @@ bool:ZSpawnClient(client, bool:force = false, bool:zombie = false) return false; } + // Client has been infected this round, respawning as a zombie new bool:teamzombie; if (!force) @@ -276,11 +278,7 @@ bool:ZSpawnClient(client, bool:force = false, bool:zombie = false) } case 0: { - // Client has been infected this round, respawning as a zombie - if(g_bZSpawnClientInfected[client]) - teamzombie = true; - else - teamzombie = false; + teamzombie = false; } case 1: { @@ -289,6 +287,10 @@ bool:ZSpawnClient(client, bool:force = false, bool:zombie = false) } } } + + // Client has been infected this round, respawning as a zombie + if(g_bZSpawnClientInfected[client]) + teamzombie = true; } else {