Bläddra i källkod

VCAI: hard limit on iterations per turn

Andrii Danylchenko 2 år sedan
förälder
incheckning
2630fb2330
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      AI/VCAI/VCAI.cpp

+ 1 - 1
AI/VCAI/VCAI.cpp

@@ -862,7 +862,7 @@ void VCAI::mainLoop()
 
 	invalidPathHeroes.clear();
 
-	while (basicGoals.size())
+	for (int pass = 0; pass< 30 && basicGoals.size(); pass++)
 	{
 		vstd::removeDuplicates(basicGoals); //TODO: container which does this automagically without has would be nice
 		goalsToAdd.clear();