|
|
@@ -265,8 +265,9 @@ uint64_t DangerHitMapAnalyzer::enemyCanKillOurHeroesAlongThePath(const AIPath &
|
|
|
{
|
|
|
int3 tile = path.targetTile();
|
|
|
int turn = path.turn();
|
|
|
- const HitMapNode & info = hitMap[tile.x][tile.y][tile.z];
|
|
|
|
|
|
+ const auto& info = getTileThreat(tile);
|
|
|
+
|
|
|
return (info.fastestDanger.turn <= turn && !isSafeToVisit(path.targetHero, path.heroArmy, info.fastestDanger.danger))
|
|
|
|| (info.maximumDanger.turn <= turn && !isSafeToVisit(path.targetHero, path.heroArmy, info.maximumDanger.danger));
|
|
|
}
|
|
|
@@ -280,9 +281,7 @@ const HitMapNode & DangerHitMapAnalyzer::getObjectThreat(const CGObjectInstance
|
|
|
|
|
|
const HitMapNode & DangerHitMapAnalyzer::getTileThreat(const int3 & tile) const
|
|
|
{
|
|
|
- const HitMapNode & info = hitMap[tile.x][tile.y][tile.z];
|
|
|
-
|
|
|
- return info;
|
|
|
+ return hitMap[tile.x][tile.y][tile.z];
|
|
|
}
|
|
|
|
|
|
const std::set<const CGObjectInstance *> empty = {};
|