Explorar o código

VCAI: hard limit on iterations per turn

Andrii Danylchenko %!s(int64=2) %!d(string=hai) anos
pai
achega
2630fb2330
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      AI/VCAI/VCAI.cpp

+ 1 - 1
AI/VCAI/VCAI.cpp

@@ -862,7 +862,7 @@ void VCAI::mainLoop()
 
 
 	invalidPathHeroes.clear();
 	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
 		vstd::removeDuplicates(basicGoals); //TODO: container which does this automagically without has would be nice
 		goalsToAdd.clear();
 		goalsToAdd.clear();