v0.6.0: fixed spawns in the entrance room, or ontop of the exit stairs
This commit is contained in:
parent
63752b11e9
commit
bd52f7322d
|
@ -234,12 +234,15 @@ public abstract class RegularLevel extends Level {
|
|||
}
|
||||
|
||||
Room room = randomRoom( StandardRoom.class );
|
||||
if (room == null) {
|
||||
if (room == null || room == roomEntrance) {
|
||||
continue;
|
||||
}
|
||||
|
||||
cell = pointToCell(room.random());
|
||||
if (!Dungeon.visible[cell] && Actor.findChar( cell ) == null && Level.passable[cell]) {
|
||||
if (!Dungeon.visible[cell]
|
||||
&& Actor.findChar( cell ) == null
|
||||
&& Level.passable[cell]
|
||||
&& cell != exit) {
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
@ -364,7 +367,7 @@ public abstract class RegularLevel extends Level {
|
|||
Room room = randomRoom( StandardRoom.class );
|
||||
if (room != null && room != roomEntrance) {
|
||||
int pos = pointToCell(room.random());
|
||||
if (passable[pos]) {
|
||||
if (passable[pos] && pos != exit) {
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user