mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-14 10:12:59 +02:00
BattleAI: Fix endless loop
Fixed an issue where the part of a 2-tile-unit that is outside of the map was considered a target and caused an endless-loop in the pathfinding being unable to get there.
This commit is contained in:
parent
b0933a1ff0
commit
6bd442e6f1
@ -245,7 +245,7 @@ AttackPossibility AttackPossibility::evaluate(
|
||||
|
||||
std::vector<BattleHex> defenderHex;
|
||||
if(attackInfo.shooting)
|
||||
defenderHex = defender->getHexes();
|
||||
defenderHex.push_back(defender->getPosition());
|
||||
else
|
||||
defenderHex = CStack::meleeAttackHexes(attacker, defender, hex);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user