1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-14 02:33:51 +02:00

[844] - fix pathfinding for fly towards guarded tile

This commit is contained in:
Andrii Danylchenko 2022-09-06 19:59:47 +03:00
parent c9eec47304
commit a25d0198a9

View File

@ -620,10 +620,11 @@ void LayerTransitionRule::process(
destination.blocked = true;
}
}
else if(source.node->accessible != CGPathNode::ACCESSIBLE && destination.node->accessible != CGPathNode::ACCESSIBLE)
else if(destination.node->accessible != CGPathNode::ACCESSIBLE)
{
/// Hero that fly can only land on accessible tiles
destination.blocked = true;
if(!destination.isGuardianTile && destination.nodeObject)
destination.blocked = true;
}
break;