mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
Make bots walk on beds and chairs
This commit is contained in:
parent
1e7a92e215
commit
0ee867a2fa
@ -3646,7 +3646,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
public RoomTile getRandomWalkableTile() {
|
public RoomTile getRandomWalkableTile() {
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
RoomTile tile = this.layout.getTile((short) (Math.random() * this.layout.getMapSizeX()), (short) (Math.random() * this.layout.getMapSizeY()));
|
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;
|
return tile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user