From bf30704891d726a7e8aa244049b7ef5a130285e4 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 13 Oct 2017 20:01:27 -0400 Subject: [PATCH] v0.6.2: fixed enemies being able to spawn ontop of the exit stairs --- .../shatteredpixeldungeon/levels/RegularLevel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java index f022ef653..25a785d97 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java @@ -215,7 +215,7 @@ public abstract class RegularLevel extends Level { Mob mob = createMob(); 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--; mobs.add(mob); @@ -224,7 +224,7 @@ public abstract class RegularLevel extends Level { mob = createMob(); 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--; mobs.add(mob); }