v0.6.2: fixed enemies being able to spawn ontop of the exit stairs
This commit is contained in:
parent
40a92bf3a4
commit
bf30704891
|
@ -215,7 +215,7 @@ public abstract class RegularLevel extends Level {
|
||||||
Mob mob = createMob();
|
Mob mob = createMob();
|
||||||
mob.pos = pointToCell(roomToSpawn.random());
|
mob.pos = pointToCell(roomToSpawn.random());
|
||||||
|
|
||||||
if (findMob(mob.pos) == null && passable[mob.pos]) {
|
if (findMob(mob.pos) == null && passable[mob.pos] && mob.pos != exit) {
|
||||||
mobsToSpawn--;
|
mobsToSpawn--;
|
||||||
mobs.add(mob);
|
mobs.add(mob);
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ public abstract class RegularLevel extends Level {
|
||||||
mob = createMob();
|
mob = createMob();
|
||||||
mob.pos = pointToCell(roomToSpawn.random());
|
mob.pos = pointToCell(roomToSpawn.random());
|
||||||
|
|
||||||
if (findMob(mob.pos) == null && passable[mob.pos]) {
|
if (findMob(mob.pos) == null && passable[mob.pos] && mob.pos != exit) {
|
||||||
mobsToSpawn--;
|
mobsToSpawn--;
|
||||||
mobs.add(mob);
|
mobs.add(mob);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user