mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-26 22:01:45 +00:00
Internal: sort sector levels only if there are more than 2 of them in a given sector.
This commit is contained in:
parent
88ae568836
commit
c98c9b4990
1 changed files with 7 additions and 4 deletions
|
@ -268,10 +268,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
foreach(SectorEffect e in alleffects)
|
foreach(SectorEffect e in alleffects)
|
||||||
e.Update();
|
e.Update();
|
||||||
|
|
||||||
// Sort the levels (but not the first and the last)
|
// Sort the levels (only if there are more than 2 sector levels - mxd)
|
||||||
SectorLevelComparer comparer = new SectorLevelComparer(sector);
|
if (lightlevels.Count > 2)
|
||||||
lightlevels.Sort(0, lightlevels.Count, comparer); //mxd. Was lightlevels.Sort(1, lightlevels.Count - 2, comparer);
|
{
|
||||||
|
SectorLevelComparer comparer = new SectorLevelComparer(sector);
|
||||||
|
lightlevels.Sort(0, lightlevels.Count, comparer); //mxd. Was lightlevels.Sort(1, lightlevels.Count - 2, comparer);
|
||||||
|
}
|
||||||
|
|
||||||
// Now that we know the levels in this sector (and in the right order) we
|
// Now that we know the levels in this sector (and in the right order) we
|
||||||
// can determine the lighting in between and on the levels.
|
// can determine the lighting in between and on the levels.
|
||||||
// Start from the absolute ceiling and go down to 'cast' the lighting
|
// Start from the absolute ceiling and go down to 'cast' the lighting
|
||||||
|
|
Loading…
Reference in a new issue