fixing endless loop happening when doing testround and alone on team
This commit is contained in:
parent
a424ccaa39
commit
3b88ace7f5
@ -698,6 +698,7 @@ public Action:InfectMotherZombie(Handle:timer)
|
|||||||
|
|
||||||
// Infect players.
|
// Infect players.
|
||||||
new infected = 0;
|
new infected = 0;
|
||||||
|
new infected_human_to_zombie_failed = 0;
|
||||||
while (infected < mothercount)
|
while (infected < mothercount)
|
||||||
{
|
{
|
||||||
// Infect one of the main candidates.
|
// Infect one of the main candidates.
|
||||||
@ -759,6 +760,15 @@ public Action:InfectMotherZombie(Handle:timer)
|
|||||||
{
|
{
|
||||||
infected++;
|
infected++;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
infected_human_to_zombie_failed++;
|
||||||
|
if (infected_human_to_zombie_failed > 100)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
//doing testround on dev server would cause script time execution, hence this was added.
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user