Skip to content

Commit 21f2e84

Browse files
committed
Fix UnmergeMergedRooms creating up-exits in dropzones below segmented rooms
1 parent 69edac9 commit 21f2e84

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

RandomizerCore/Sidescroll/CoordinatePalaceGenerator.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,12 +245,18 @@ private static void UnmergeMergedRooms(Palace palace, RoomPool roomPool)
245245
if (newPrimaryRoom.HasDownExit)
246246
{
247247
newPrimaryRoom.Down = primaryRoom.Down;
248-
primaryRoom.Down.Up = newPrimaryRoom;
248+
if (primaryRoom.Down.HasUpExit)
249+
{
250+
primaryRoom.Down.Up = newPrimaryRoom;
251+
}
249252
}
250253
else if (secondaryRoom.HasDownExit)
251254
{
252255
secondaryRoom.Down = primaryRoom.Down;
253-
primaryRoom.Down.Up = secondaryRoom;
256+
if (primaryRoom.Down.HasUpExit)
257+
{
258+
primaryRoom.Down.Up = secondaryRoom;
259+
}
254260
}
255261
}
256262
if (primaryRoom.Left != null)

0 commit comments

Comments
 (0)