Walk through fixed

This commit is contained in:
Beny 2019-05-04 10:46:04 +01:00
parent faf050b1cc
commit 36a0f848d2

View File

@ -314,7 +314,7 @@ public class RoomLayout
if (height > MAXIMUM_STEP_HEIGHT && currentAdj.state == RoomTileState.OPEN) continue;
//Check if the tile has habbos.
if (!this.room.isAllowWalkthrough() && this.room.hasHabbosAt(currentAdj.x, currentAdj.y))
if ((!this.room.isAllowWalkthrough() || currentAdj.equals(goalLocation)) && (this.room.hasHabbosAt(currentAdj.x, currentAdj.y) || this.room.hasPetsAt(currentAdj.x, currentAdj.y) || this.room.hasBotsAt(currentAdj.x, currentAdj.y)))
{
closedList.add(currentAdj);
openList.remove(currentAdj);