From 05bfa851c46c1796298d3ef331861eeab8f8b46e Mon Sep 17 00:00:00 2001 From: MaxED Date: Thu, 10 Nov 2016 00:35:29 +0000 Subject: [PATCH] Changed, Sector drawing: sector height is set to 0 when the nearest sector's height is < 0 (previously default sector height was used when the nearest sector's height was <= 0). --- Source/Core/Geometry/Tools.cs | 15 +++++++-------- Source/Core/app.manifest | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Source/Core/Geometry/Tools.cs b/Source/Core/Geometry/Tools.cs index 6cb4d50..c43a95a 100644 --- a/Source/Core/Geometry/Tools.cs +++ b/Source/Core/Geometry/Tools.cs @@ -583,14 +583,8 @@ namespace CodeImp.DoomBuilder.Geometry newsector.Brightness = General.Settings.DefaultBrightness; } - //mxd. Better any height than none - if (newsector.CeilHeight - newsector.FloorHeight <= 0) - { - newsector.CeilHeight = newsector.FloorHeight + (General.Settings.DefaultCeilingHeight - General.Settings.DefaultFloorHeight); - } - - //mxd. Apply overrides? - if (useOverrides) + //mxd. Apply overrides? + if(useOverrides) { if(General.Map.Options.OverrideCeilingTexture) newsector.SetCeilTexture(General.Map.Options.DefaultCeilingTexture); if(General.Map.Options.OverrideFloorTexture) newsector.SetFloorTexture(General.Map.Options.DefaultFloorTexture); @@ -598,6 +592,11 @@ namespace CodeImp.DoomBuilder.Geometry if(General.Map.Options.OverrideFloorHeight) newsector.FloorHeight = General.Map.Options.CustomFloorHeight; if(General.Map.Options.OverrideBrightness) newsector.Brightness = General.Map.Options.CustomBrightness; } + //mxd. Avoid invalid height + else if(newsector.CeilHeight < newsector.FloorHeight) + { + newsector.CeilHeight = newsector.FloorHeight; + } // Go for all sides to make sidedefs foreach(LinedefSide ls in alllines) diff --git a/Source/Core/app.manifest b/Source/Core/app.manifest index fc56c43..7226972 100644 --- a/Source/Core/app.manifest +++ b/Source/Core/app.manifest @@ -1,6 +1,6 @@  - +