UDMF: ceiling plane equation fields are not rounded anymore

This commit is contained in:
biwa 2021-05-28 18:56:50 +02:00
parent 307c319375
commit d3205d4557
2 changed files with 4 additions and 18 deletions

View file

@ -298,13 +298,6 @@ namespace CodeImp.DoomBuilder.IO
//mxd. Slopes
if(s.FloorSlope.GetLengthSq() > 0)
{
/*
coll.Add("floorplane_a", Math.Round(s.FloorSlope.x, Sector.SLOPE_DECIMALS));
coll.Add("floorplane_b", Math.Round(s.FloorSlope.y, Sector.SLOPE_DECIMALS));
coll.Add("floorplane_c", Math.Round(s.FloorSlope.z, Sector.SLOPE_DECIMALS));
coll.Add("floorplane_d",
(double.IsNaN(s.FloorSlopeOffset) ? 0f : Math.Round(s.FloorSlopeOffset, Sector.SLOPE_DECIMALS)));
*/
coll.Add("floorplane_a", s.FloorSlope.x);
coll.Add("floorplane_b", s.FloorSlope.y);
coll.Add("floorplane_c", s.FloorSlope.z);
@ -313,11 +306,10 @@ namespace CodeImp.DoomBuilder.IO
if (s.CeilSlope.GetLengthSq() > 0)
{
coll.Add("ceilingplane_a", Math.Round(s.CeilSlope.x, Sector.SLOPE_DECIMALS));
coll.Add("ceilingplane_b", Math.Round(s.CeilSlope.y, Sector.SLOPE_DECIMALS));
coll.Add("ceilingplane_c", Math.Round(s.CeilSlope.z, Sector.SLOPE_DECIMALS));
coll.Add("ceilingplane_d",
(double.IsNaN(s.CeilSlopeOffset) ? 0f : Math.Round(s.CeilSlopeOffset, Sector.SLOPE_DECIMALS)));
coll.Add("ceilingplane_a", s.CeilSlope.x);
coll.Add("ceilingplane_b", s.CeilSlope.y);
coll.Add("ceilingplane_c", s.CeilSlope.z);
coll.Add("ceilingplane_d", double.IsNaN(s.CeilSlopeOffset) ? 0.0 : s.CeilSlopeOffset);
}
//mxd. Flags

View file

@ -39,12 +39,6 @@ namespace CodeImp.DoomBuilder.Map
public sealed class Sector : SelectableElement, IMultiTaggedMapElement
{
#region ================== Constants
internal const int SLOPE_DECIMALS = 7;
#endregion
#region ================== Variables
// Map