mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Simplify code
This commit is contained in:
parent
d7f5d24b99
commit
0a3cfea017
@ -342,11 +342,11 @@ PathfinderBlockingRule::BlockingReason MovementToDestinationRule::getBlockingRea
|
||||
break;
|
||||
|
||||
case EPathfindingLayer::WATER:
|
||||
if(!pathfinderHelper->canMoveBetween(source.coord, destination.coord)
|
||||
|| destination.node->accessible != EPathAccessibility::ACCESSIBLE)
|
||||
{
|
||||
if(!pathfinderHelper->canMoveBetween(source.coord, destination.coord))
|
||||
return BlockingReason::DESTINATION_BLOCKED;
|
||||
|
||||
if (destination.node->accessible != EPathAccessibility::ACCESSIBLE)
|
||||
return BlockingReason::DESTINATION_BLOCKED;
|
||||
}
|
||||
|
||||
if(destination.guarded)
|
||||
return BlockingReason::DESTINATION_BLOCKED;
|
||||
|
Loading…
Reference in New Issue
Block a user