From 1734caeed8ac1790caec4f8a5b2142233271bb75 Mon Sep 17 00:00:00 2001 From: Brady Date: Wed, 29 Aug 2018 18:59:22 -0500 Subject: [PATCH] Minor MovementDiagonal cleanup --- .../pathing/movement/movements/MovementDiagonal.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/java/baritone/pathing/movement/movements/MovementDiagonal.java b/src/main/java/baritone/pathing/movement/movements/MovementDiagonal.java index 384cf6be..023197c1 100644 --- a/src/main/java/baritone/pathing/movement/movements/MovementDiagonal.java +++ b/src/main/java/baritone/pathing/movement/movements/MovementDiagonal.java @@ -106,18 +106,12 @@ public class MovementDiagonal extends Movement { return COST_INF; } if (optionA == 0) { - if (MovementHelper.avoidWalkingInto(pb2.getBlock())) { - return COST_INF; - } - if (MovementHelper.avoidWalkingInto(pb3.getBlock())) { + if (MovementHelper.avoidWalkingInto(pb2.getBlock()) || MovementHelper.avoidWalkingInto(pb3.getBlock())) { return COST_INF; } } if (optionB == 0) { - if (MovementHelper.avoidWalkingInto(pb0.getBlock())) { - return COST_INF; - } - if (MovementHelper.avoidWalkingInto(pb1.getBlock())) { + if (MovementHelper.avoidWalkingInto(pb0.getBlock()) || MovementHelper.avoidWalkingInto(pb1.getBlock())) { return COST_INF; } }