From f4d81d79750448929862ac8c2e518272874dc77c Mon Sep 17 00:00:00 2001 From: helixhorned Date: Fri, 25 Nov 2011 09:52:52 +0000 Subject: [PATCH] "Sloped extended sectors cannot be split", oops. Also fix a glitch that would break out of the 2D mode loop when splitting a sector would exceed limits. git-svn-id: https://svn.eduke32.com/eduke32@2129 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/build.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index b946e7498..026e6cc4c 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -2665,7 +2665,7 @@ static int32_t AddLoopToSector(int32_t k) if ((cbunch>=0 && (sector[k].ceilingstat&2)) || (fbunch>=0 && (sector[k].floorstat&2))) { - message("Sloped extended sectors cannot be subdivided."); + printmessage16("Sloped extended sectors cannot be subdivided."); newnumwalls--; return -1; } @@ -6136,9 +6136,23 @@ check_next_sector: ; printmessage16("%s would exceed wall limit.", bad==0 ? "Splitting sector" : "Joining sector loops"); newnumwalls--; - break; + goto end_space_handling; } +#ifdef YAX_ENABLE + { + int16_t cb, fb; + yax_getbunches(ovh.splitsect, &cb, &fb); + + if ((cb>=0 && (sector[ovh.splitsect].ceilingstat&2)) + || (fb>=0 && (sector[ovh.splitsect].floorstat&2))) + { + printmessage16("Sloped extended sectors cannot be split."); + newnumwalls--; + goto end_space_handling; + } + } +#endif ////////// common code for splitting/loop joining ////////// newnumwalls--; //first fix up the new walls