GENERAL: Fix consecutive motherzm infections.
This commit is contained in:
parent
f58e0091dd
commit
6c35c59b81
|
@ -542,6 +542,9 @@ public Action:InfectMotherZombie(Handle:timer)
|
||||||
// Get the client stored in the array index.
|
// Get the client stored in the array index.
|
||||||
new client = GetArrayCell(arrayEligibleClients, n);
|
new client = GetArrayCell(arrayEligibleClients, n);
|
||||||
|
|
||||||
|
// If client hasn't been chosen last round.
|
||||||
|
if (!g_bInfectMotherLast[client])
|
||||||
|
{
|
||||||
// If client hasn't been chosen this cycle, put into aCandidatesMain array.
|
// If client hasn't been chosen this cycle, put into aCandidatesMain array.
|
||||||
if (!SteamidCacheClientExists(g_hInfectMotherCycle, client))
|
if (!SteamidCacheClientExists(g_hInfectMotherCycle, client))
|
||||||
{
|
{
|
||||||
|
@ -549,13 +552,14 @@ public Action:InfectMotherZombie(Handle:timer)
|
||||||
candidatesMain++;
|
candidatesMain++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If client hasn't been chosen last round, put into aCandidatesAlt array.
|
// Else put into aCandidatesAlt array.
|
||||||
else if (!g_bInfectMotherLast[client])
|
else
|
||||||
{
|
{
|
||||||
PushArrayCell(aCandidatesAlt, client);
|
PushArrayCell(aCandidatesAlt, client);
|
||||||
candidatesAlt++;
|
candidatesAlt++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Remove mother zombie last flag from all players.
|
// Remove mother zombie last flag from all players.
|
||||||
for (int client = 0; client <= MAXPLAYERS; client++)
|
for (int client = 0; client <= MAXPLAYERS; client++)
|
||||||
|
@ -586,6 +590,7 @@ public Action:InfectMotherZombie(Handle:timer)
|
||||||
RemoveFromArray(aCandidatesMain, i);
|
RemoveFromArray(aCandidatesMain, i);
|
||||||
candidatesMain--;
|
candidatesMain--;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Infect one of the alternate candidates.
|
// Infect one of the alternate candidates.
|
||||||
else if (candidatesAlt)
|
else if (candidatesAlt)
|
||||||
{
|
{
|
||||||
|
@ -606,6 +611,7 @@ public Action:InfectMotherZombie(Handle:timer)
|
||||||
// Enable the cycle reset.
|
// Enable the cycle reset.
|
||||||
resetcycle = true;
|
resetcycle = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We have no candidates at all, abort!
|
// We have no candidates at all, abort!
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user