diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java index de3879bf7..efd51f3ca 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java @@ -738,12 +738,17 @@ public abstract class RegularLevel extends Level { public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); - rooms = new HashSet( (Collection) ((Collection) bundle.getCollection( "rooms" )) ); + rooms = new HashSet<>( (Collection) ((Collection) bundle.getCollection( "rooms" )) ); for (Room r : rooms) { if (r.type == Type.WEAK_FLOOR) { weakFloorCreated = true; break; } + if (r.type == Type.ENTRANCE){ + roomEntrance = r; + } else if (r.type == Type.EXIT || r.type == Type.BOSS_EXIT){ + roomExit = r; + } } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java index 5eb2f3b62..26071e7fb 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java @@ -281,6 +281,7 @@ public class SewerBossLevel extends RegularLevel { public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); stairs = bundle.getInt( STAIRS ); + roomExit = roomEntrance; } @Override