mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Merge pull request #4720 from MichalZr6/obstacle_affected_hexes
Fix flying units move into damaging obstacles
This commit is contained in:
commit
de34dad9f4
@ -394,7 +394,7 @@ BattleAction BattleEvaluator::goTowardsNearest(const CStack * stack, std::vector
|
|||||||
{
|
{
|
||||||
std::set<BattleHex> obstacleHexes;
|
std::set<BattleHex> obstacleHexes;
|
||||||
|
|
||||||
auto insertAffected = [](const CObstacleInstance & spellObst, std::set<BattleHex> obstacleHexes) {
|
auto insertAffected = [](const CObstacleInstance & spellObst, std::set<BattleHex> & obstacleHexes) {
|
||||||
auto affectedHexes = spellObst.getAffectedTiles();
|
auto affectedHexes = spellObst.getAffectedTiles();
|
||||||
obstacleHexes.insert(affectedHexes.cbegin(), affectedHexes.cend());
|
obstacleHexes.insert(affectedHexes.cbegin(), affectedHexes.cend());
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user