فهرست منبع

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

VCAI: hard limit on iterations per turn
Ivan Savenko 2 سال پیش
والد
کامیت
06b35ce533
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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();