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

BattleAction: handle obstacle for standing units

This commit is contained in:
Konstantin 2023-10-28 18:34:11 +03:00
parent 7531400f53
commit f6b03201db

View File

@ -852,6 +852,8 @@ int BattleActionProcessor::moveStack(const CBattleInfoCallback & battle, int sta
|| start == battle::Unit::occupiedHex(dest, curStack->doubleWide(), curStack->unitSide()))
passed.clear(); //Just empty passed, obstacles will handled automatically
}
if(dest == start) //If dest is equal to start, then we should handle obstacles for it anyway
passed.clear(); //Just empty passed, obstacles will handled automatically
//handling obstacle on the final field (separate, because it affects both flying and walking stacks)
battle.handleObstacleTriggersForUnit(*gameHandler->spellEnv, *curStack, passed);