1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Simplify code

This commit is contained in:
Ivan Savenko 2024-05-23 18:47:13 +00:00
parent d7f5d24b99
commit 0a3cfea017

View File

@ -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;