added message when zombie cycle ended
This commit is contained in:
2016-03-01 23:36:47 +01:00
parent 1bd2fb7354
commit a732205f8c
6 changed files with 30 additions and 51 deletions

View File

@ -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.
*

View File

@ -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
{