Просмотр исходного кода

Temp fix for blocked in garrison ai.

Andrii Danylchenko 2 лет назад
Родитель
Сommit
38a98387e4
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      AI/Nullkiller/Pathfinding/AINodeStorage.cpp

+ 1 - 1
AI/Nullkiller/Pathfinding/AINodeStorage.cpp

@@ -879,7 +879,7 @@ void AINodeStorage::setHeroes(std::map<const CGHeroInstance *, HeroRole> heroes)
 	for(auto & hero : heroes)
 	{
 		// do not allow our own heroes in garrison to act on map
-		if(hero.first->getOwner() == ai->playerID && hero.first->inTownGarrison)
+		if(hero.first->getOwner() == ai->playerID && hero.first->inTownGarrison && ai->isHeroLocked(hero.first))
 			continue;
 
 		uint64_t mask = FirstActorMask << actors.size();