removed the tier based infection again, its just randomized again
This commit is contained in:
+14
-29
@@ -32,7 +32,6 @@
|
|||||||
|
|
||||||
#tryinclude "AFKManager.inc"
|
#tryinclude "AFKManager.inc"
|
||||||
#tryinclude "TeamManager.inc"
|
#tryinclude "TeamManager.inc"
|
||||||
#include "unloze_playtime.inc"
|
|
||||||
|
|
||||||
/* Restore old REQUIRE_PLUGIN value if necessary */
|
/* Restore old REQUIRE_PLUGIN value if necessary */
|
||||||
#if defined TEMP_REQUIRE_PLUGIN
|
#if defined TEMP_REQUIRE_PLUGIN
|
||||||
@@ -707,24 +706,17 @@ public Action:InfectMotherZombie(Handle:timer)
|
|||||||
// Infect one of the main candidates.
|
// Infect one of the main candidates.
|
||||||
if (candidatesMain)
|
if (candidatesMain)
|
||||||
{
|
{
|
||||||
// Find lowest tier candidate.
|
// Get a random array index.
|
||||||
new lowestIndex = 0;
|
new i = Math_GetRandomInt(0, candidatesMain - 1);
|
||||||
new lowestTier = GetPlayerTier_native(GetArrayCell(aCandidatesMain, 0));
|
// Get the client stored in the random array index.
|
||||||
for (new n = 1; n < candidatesMain; n++)
|
new client = GetArrayCell(aCandidatesMain, i);
|
||||||
{
|
|
||||||
new tier = GetPlayerTier_native(GetArrayCell(aCandidatesMain, n));
|
|
||||||
if (tier < lowestTier)
|
|
||||||
{
|
|
||||||
lowestTier = tier;
|
|
||||||
lowestIndex = n;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
new client = GetArrayCell(aCandidatesMain, lowestIndex);
|
|
||||||
|
|
||||||
|
// Infect player.
|
||||||
if (InfectHumanToZombie(client, _, true))
|
if (InfectHumanToZombie(client, _, true))
|
||||||
infected++;
|
infected++;
|
||||||
|
|
||||||
RemoveFromArray(aCandidatesMain, lowestIndex);
|
// Remove player from eligible client list.
|
||||||
|
RemoveFromArray(aCandidatesMain, i);
|
||||||
candidatesMain--;
|
candidatesMain--;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -744,24 +736,17 @@ public Action:InfectMotherZombie(Handle:timer)
|
|||||||
// Infect one of the alternate candidates.
|
// Infect one of the alternate candidates.
|
||||||
if (candidatesAlt)
|
if (candidatesAlt)
|
||||||
{
|
{
|
||||||
// Find lowest tier candidate.
|
// Get a random array index.
|
||||||
new lowestIndex = 0;
|
new i = Math_GetRandomInt(0, candidatesAlt - 1);
|
||||||
new lowestTier = GetPlayerTier_native(GetArrayCell(aCandidatesAlt, 0));
|
// Get the client stored in the random array index.
|
||||||
for (new n = 1; n < candidatesAlt; n++)
|
new client = GetArrayCell(aCandidatesAlt, i);
|
||||||
{
|
|
||||||
new tier = GetPlayerTier_native(GetArrayCell(aCandidatesAlt, n));
|
|
||||||
if (tier < lowestTier)
|
|
||||||
{
|
|
||||||
lowestTier = tier;
|
|
||||||
lowestIndex = n;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
new client = GetArrayCell(aCandidatesAlt, lowestIndex);
|
|
||||||
|
|
||||||
|
// Infect player.
|
||||||
if (InfectHumanToZombie(client, _, true))
|
if (InfectHumanToZombie(client, _, true))
|
||||||
infected++;
|
infected++;
|
||||||
|
|
||||||
RemoveFromArray(aCandidatesAlt, lowestIndex);
|
// Remove player from eligible client list.
|
||||||
|
RemoveFromArray(aCandidatesAlt, i);
|
||||||
candidatesAlt--;
|
candidatesAlt--;
|
||||||
}
|
}
|
||||||
else // We have no candidates at all. time to fuck over random people!
|
else // We have no candidates at all. time to fuck over random people!
|
||||||
|
|||||||
Reference in New Issue
Block a user