"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
This commit is contained in:
helixhorned 2011-11-25 09:52:52 +00:00
parent 98ad4d7132
commit f4d81d7975

View file

@ -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