mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-30 01:50:50 +01:00
Fixed pathfinder bug
This commit is contained in:
parent
7e6a63bc38
commit
122c646c13
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user