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:
parent
75f8614f26
commit
a2f417e3ac
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user