Переглянути джерело

VCAI: hard limit on iterations per turn

Andrii Danylchenko 2 роки тому
батько
коміт
2630fb2330
1 змінених файлів з 1 додано та 1 видалено
  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();