fixing endless loop happening when doing testround and alone on team

This commit is contained in:
2024-06-21 06:55:59 +02:00
committed by zaCade
parent a424ccaa39
commit 3b88ace7f5
+10
View File
@@ -698,6 +698,7 @@ public Action:InfectMotherZombie(Handle:timer)
// Infect players.
new infected = 0;
new infected_human_to_zombie_failed = 0;
while (infected < mothercount)
{
// Infect one of the main candidates.
@@ -759,6 +760,15 @@ public Action:InfectMotherZombie(Handle:timer)
{
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
{