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