Make bots walk on beds and chairs

This commit is contained in:
Alejandro 2019-08-05 19:59:52 +03:00
parent 1e7a92e215
commit 0ee867a2fa

View File

@ -3646,7 +3646,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
public RoomTile getRandomWalkableTile() {
for (int i = 0; i < 10; i++) {
RoomTile tile = this.layout.getTile((short) (Math.random() * this.layout.getMapSizeX()), (short) (Math.random() * this.layout.getMapSizeY()));
if (tile != null && tile.isWalkable()) {
if (tile != null && tile.getState() != RoomTileState.BLOCKED && tile.getState() != RoomTileState.INVALID) {
return tile;
}
}