diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/DeadEndLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/DeadEndLevel.java index 9c74f9bf9..8cbc58738 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/DeadEndLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/DeadEndLevel.java @@ -63,9 +63,9 @@ public class DeadEndLevel extends Level { entrance = SIZE * WIDTH + SIZE / 2 + 1; map[entrance] = Terrain.ENTRANCE; - exit = (SIZE / 2 + 1) * (WIDTH + 1); + map[(SIZE / 2 + 1) * (WIDTH + 1)] = Terrain.SIGN; - map[exit] = Terrain.SIGN; + exit = 0; return true; } @@ -91,7 +91,7 @@ public class DeadEndLevel extends Level { @Override public int randomRespawnCell() { - return -1; + return entrance-WIDTH; } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/LastLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/LastLevel.java index e7ba1b8d8..80499841e 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/LastLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/LastLevel.java @@ -23,6 +23,7 @@ import com.watabou.noosa.Scene; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.items.Amulet; import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; +import com.watabou.utils.Bundle; import com.watabou.utils.Random; public class LastLevel extends Level { @@ -160,4 +161,16 @@ public class LastLevel extends Level { super.addVisuals( scene ); HallsLevel.addVisuals( this, scene ); } + + @Override + public void restoreFromBundle(Bundle bundle) { + super.restoreFromBundle(bundle); + for (int i=0; i < LENGTH; i++) { + int flags = Terrain.flags[map[i]]; + if ((flags & Terrain.PIT) != 0){ + passable[i] = avoid[i] = false; + solid[i] = true; + } + } + } }