1
0
mirror of https://github.com/vcmi/vcmi.git synced 2026-05-22 09:55:17 +02:00

Now unit range is shown in Tactics phase as well

A new parameter: isActiveStack was needed in battleGetAvailableHexes, so that we show the propper Tactics range.
This commit is contained in:
krs
2023-03-23 23:03:18 +02:00
parent e1c388465a
commit dab07bdef9
7 changed files with 25 additions and 28 deletions
+1 -1
View File
@@ -271,7 +271,7 @@ BattleAction CBattleAI::activeStack( const CStack * stack )
BattleAction CBattleAI::goTowardsNearest(const CStack * stack, std::vector<BattleHex> hexes) const
{
auto reachability = cb->getReachability(stack);
auto avHexes = cb->battleGetAvailableHexes(reachability, stack);
auto avHexes = cb->battleGetAvailableHexes(reachability, stack, true);
if(!avHexes.size() || !hexes.size()) //we are blocked or dest is blocked
{