Explorar o código

Merge pull request #1595 from vcmi/vkai-hack-to-workaround-freezes

VCAI: hard limit on iterations per turn
Ivan Savenko %!s(int64=2) %!d(string=hai) anos
pai
achega
06b35ce533
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      AI/VCAI/VCAI.cpp

+ 1 - 1
AI/VCAI/VCAI.cpp

@@ -863,7 +863,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();