From 122c646c13a7487d79b8a22f16f740746996b7c0 Mon Sep 17 00:00:00 2001 From: Beny Date: Sun, 5 May 2019 05:21:02 +0100 Subject: [PATCH] Fixed pathfinder bug --- src/main/java/com/eu/habbo/habbohotel/rooms/RoomLayout.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomLayout.java b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomLayout.java index b46ea095..7bd8f853 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomLayout.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomLayout.java @@ -407,14 +407,11 @@ public class RoomLayout return null; RoomTile cheapest = openList.get(0); - int cheapestFcost = Integer.MAX_VALUE; for (RoomTile anOpenList : openList) { - int f = cheapest.getfCosts(); - if (anOpenList.getfCosts() < cheapestFcost) + if (anOpenList.getfCosts() < cheapest.getfCosts()) { cheapest = anOpenList; - cheapestFcost = f; } } return cheapest;