2
0
Эх сурвалжийг харах

Fixed an issue that could cause the AI to skip almost their entire turn

If the best Task is to recruit a hero this now triggers pathfinding again as the newly bought hero may impair other heroe's paths.
Xilmi 10 сар өмнө
parent
commit
eab6de4686

+ 6 - 1
AI/Nullkiller/Engine/Nullkiller.cpp

@@ -397,7 +397,12 @@ void Nullkiller::makeTurn()
 				if(!executeTask(bestTask))
 					return;
 
-				updateAiState(i, true);
+				bool fastUpdate = true;
+
+				if (bestTask->getHero() != nullptr)
+					fastUpdate = false;
+
+				updateAiState(i, fastUpdate);
 			}
 			else
 			{