mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
Simplify code
This commit is contained in:
@ -342,11 +342,11 @@ PathfinderBlockingRule::BlockingReason MovementToDestinationRule::getBlockingRea
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case EPathfindingLayer::WATER:
|
case EPathfindingLayer::WATER:
|
||||||
if(!pathfinderHelper->canMoveBetween(source.coord, destination.coord)
|
if(!pathfinderHelper->canMoveBetween(source.coord, destination.coord))
|
||||||
|| destination.node->accessible != EPathAccessibility::ACCESSIBLE)
|
return BlockingReason::DESTINATION_BLOCKED;
|
||||||
{
|
|
||||||
|
if (destination.node->accessible != EPathAccessibility::ACCESSIBLE)
|
||||||
return BlockingReason::DESTINATION_BLOCKED;
|
return BlockingReason::DESTINATION_BLOCKED;
|
||||||
}
|
|
||||||
|
|
||||||
if(destination.guarded)
|
if(destination.guarded)
|
||||||
return BlockingReason::DESTINATION_BLOCKED;
|
return BlockingReason::DESTINATION_BLOCKED;
|
||||||
|
Reference in New Issue
Block a user