1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-28 23:06:24 +02:00

BattleAI: fix camera obscura

This commit is contained in:
Andrii Danylchenko 2022-12-10 12:11:14 +02:00
parent 0016b77192
commit 59c3962e9c

View File

@ -204,10 +204,14 @@ MoveTarget BattleExchangeEvaluator::findMoveTowardsUnreachable(const battle::Uni
if(targets.unreachableEnemies.empty())
return result;
auto speed = activeStack->Speed();
if(speed == 0)
return result;
updateReachabilityMap(hb);
auto dists = cb->getReachability(activeStack);
auto speed = activeStack->Speed();
for(const battle::Unit * enemy : targets.unreachableEnemies)
{