diff --git a/AI/Nullkiller/Analyzers/DangerHitMapAnalyzer.cpp b/AI/Nullkiller/Analyzers/DangerHitMapAnalyzer.cpp index 17f69c2af..27bfe5dd0 100644 --- a/AI/Nullkiller/Analyzers/DangerHitMapAnalyzer.cpp +++ b/AI/Nullkiller/Analyzers/DangerHitMapAnalyzer.cpp @@ -89,6 +89,14 @@ void DangerHitMapAnalyzer::updateHitMap() heroes[hero->tempOwner][hero] = HeroRole::MAIN; } + if (obj->ID == Obj::TOWN) + { + auto town = dynamic_cast(obj); + auto hero = town->garrisonHero; + + if(hero) + heroes[hero->tempOwner][hero] = HeroRole::MAIN; + } } auto ourTowns = cb->getTownsInfo();