From 3b88ace7f5603ec0a00112671bd6ee0b1390d1bb Mon Sep 17 00:00:00 2001 From: jenz Date: Fri, 19 Jan 2024 17:02:27 +0100 Subject: [PATCH] fixing endless loop happening when doing testround and alone on team --- src/zr/infect.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/zr/infect.inc b/src/zr/infect.inc index 81cd77e..3ea10bd 100644 --- a/src/zr/infect.inc +++ b/src/zr/infect.inc @@ -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 {