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

Fix being stuck in blocked tiles while flying towards hero

This commit is contained in:
Dydzio 2024-09-12 18:47:23 +02:00
parent 75f8614f26
commit a2f417e3ac

View File

@ -394,7 +394,7 @@ void LayerTransitionRule::process(
{
if(source.node->accessible != EPathAccessibility::ACCESSIBLE && source.node->accessible != EPathAccessibility::VISITABLE)
{
if (destination.node->accessible == EPathAccessibility::BLOCKVIS)
if (destination.node->accessible == EPathAccessibility::BLOCKVIS || (destination.node->accessible == EPathAccessibility::VISITABLE && destination.nodeHero != nullptr))
{
// Can't visit 'blockvisit' objects on coast if hero will end up on water terrain
if (source.tile->blocked || !destination.tile->entrableTerrain(source.tile))