1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

Merge pull request #4720 from MichalZr6/obstacle_affected_hexes

Fix flying units move into damaging obstacles
This commit is contained in:
Ivan Savenko 2024-10-06 15:59:19 +03:00 committed by GitHub
commit de34dad9f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -394,7 +394,7 @@ BattleAction BattleEvaluator::goTowardsNearest(const CStack * stack, std::vector
{
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();
obstacleHexes.insert(affectedHexes.cbegin(), affectedHexes.cend());
};