1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Allow landing on guarded tiles when flying in from guarded tile

This commit is contained in:
Ivan Savenko 2024-05-23 19:00:10 +00:00
parent 3fdbc09986
commit f7989f6dcb

View File

@ -303,7 +303,7 @@ PathfinderBlockingRule::BlockingReason MovementToDestinationRule::getBlockingRea
if(source.guarded)
{
if(!(pathfinderConfig->options.originalFlyRules && source.node->layer == EPathfindingLayer::AIR)
if(source.node->layer != EPathfindingLayer::AIR
&& !pathfinderConfig->options.ignoreGuards
&& (!destination.isGuardianTile || pathfinderHelper->getGuardiansCount(source.coord) > 1)) // Can step into tile of guard
{