mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fixed handling of original game rules pathfinding
This commit is contained in:
parent
0a3cfea017
commit
ac047d0d6d
@ -278,7 +278,6 @@ PathfinderBlockingRule::BlockingReason MovementAfterDestinationRule::getBlocking
|
||||
else
|
||||
return BlockingReason::DESTINATION_GUARDED;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@ -396,14 +395,20 @@ void LayerTransitionRule::process(
|
||||
destination.node->accessible != EPathAccessibility::VISITABLE &&
|
||||
destination.node->accessible != EPathAccessibility::ACCESSIBLE)
|
||||
{
|
||||
if(destination.node->accessible == EPathAccessibility::BLOCKVIS)
|
||||
{
|
||||
if(source.nodeObject || (source.tile->blocked && destination.tile->blocked))
|
||||
|
||||
if (destination.node->accessible == EPathAccessibility::BLOCKVIS)
|
||||
{
|
||||
if (source.tile->blocked || !destination.tile->entrableTerrain(source.tile))
|
||||
destination.blocked = true;
|
||||
}
|
||||
|
||||
if (destination.node->accessible == EPathAccessibility::FLYABLE)
|
||||
destination.blocked = true;
|
||||
}
|
||||
else
|
||||
|
||||
if(destination.node->accessible == EPathAccessibility::VISITABLE)
|
||||
{
|
||||
if (destination.node->accessible != EPathAccessibility::VISITABLE)
|
||||
destination.blocked = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user