Using the "Reset plane slope" action now sets the floor or ceiling heights to the height of the plane at the sector's bounding box center

This commit is contained in:
biwa 2021-02-20 16:26:35 +01:00
parent 7d2e3db982
commit 1e3cf5ccec

View file

@ -4422,12 +4422,18 @@ namespace CodeImp.DoomBuilder.BuilderModes
if (applytoceiling)
{
// Set the ceiling height to something hopefully sensible
level.sector.CeilHeight = (int)Math.Round(level.plane.GetZ(level.sector.BBox.X + level.sector.BBox.Width / 2, level.sector.BBox.Y + level.sector.BBox.Height / 2));
level.sector.CeilSlopeOffset = double.NaN;
level.sector.CeilSlope = new Vector3D();
numceilings++;
}
else
{
// Set the floor height to something hopefully sensible
level.sector.FloorHeight = (int)Math.Round(level.plane.GetZ(level.sector.BBox.X + level.sector.BBox.Width / 2, level.sector.BBox.Y + level.sector.BBox.Height / 2));
level.sector.FloorSlopeOffset = double.NaN;
level.sector.FloorSlope = new Vector3D();
numfloors++;