From 9dde07ced9ce86da64fffd9c4cafeaff3ba0b834 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Tue, 26 Nov 2019 08:24:49 +0000 Subject: [PATCH] SW: Copy the sln==1 GetUpperLowerSector case from the editor to the game This avoids upper and lower remaining unmodified. Sector 469 in Seppuku Station causes it! git-svn-id: https://svn.eduke32.com/eduke32@8306 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/sw/src/brooms.cpp --- source/sw/src/rooms.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/source/sw/src/rooms.cpp b/source/sw/src/rooms.cpp index 90e07d57e..99e812ba6 100644 --- a/source/sw/src/rooms.cpp +++ b/source/sw/src/rooms.cpp @@ -846,10 +846,17 @@ GetUpperLowerSector(short match, int x, int y, short *upper, short *lower) *lower = -1; return; } - else + // Map rooms have NOT been dragged on top of each other + else if (sln == 1) + { + *lower = sectorlist[0]; + *upper = sectorlist[0]; + return; + } + // Map rooms HAVE been dragged on top of each other // inside will somtimes find that you are in two different sectors if the x,y // is exactly on a sector line. - if (sln > 2) + else if (sln > 2) { //DSPRINTF(ds, "TOO MANY SECTORS FOUND: x=%d, y=%d, match=%d, num sectors %d, %d, %d, %d, %d, %d", x, y, match, sln, sectorlist[0], sectorlist[1], sectorlist[2], sectorlist[3], sectorlist[4]); MONO_PRINT(ds);