diff --git a/Source/Plugins/BuilderModes/VisualModes/VisualSidedefSlope.cs b/Source/Plugins/BuilderModes/VisualModes/VisualSidedefSlope.cs index 6346c914..b6c2c38d 100644 --- a/Source/Plugins/BuilderModes/VisualModes/VisualSidedefSlope.cs +++ b/Source/Plugins/BuilderModes/VisualModes/VisualSidedefSlope.cs @@ -315,14 +315,10 @@ namespace CodeImp.DoomBuilder.VisualModes Plane originalplane = level.plane; Plane pivotplane = ((VisualSidedefSlope)pivothandle).Level.plane; - // Build a new plane. p1 and p2 are the points of the slope handle that is modified, p3 is on the line of the pivot handle - Vector3D p1 = new Vector3D(sidedef.Line.Start.Position, Math.Round(originalplane.GetZ(sidedef.Line.Start.Position))); - Vector3D p2 = new Vector3D(sidedef.Line.End.Position, Math.Round(originalplane.GetZ(sidedef.Line.End.Position))); - Vector3D p3 = new Vector3D(((VisualSidedefSlope)pivothandle).Sidedef.Line.Line.GetCoordinatesAt(0.5f), Math.Round(pivotplane.GetZ(((VisualSidedefSlope)pivothandle).Sidedef.Line.Line.GetCoordinatesAt(0.5f)))); - - // Move the points of the handle up/down - p1 += new Vector3D(0f, 0f, amount); - p2 += new Vector3D(0f, 0f, amount); + // Build a new plane. p1 and p2 are the points of the slope handle that is modified, with the changed amound added; p3 is on the line of the pivot handle + Vector3D p1 = new Vector3D(sidedef.Line.Start.Position, originalplane.GetZ(sidedef.Line.Start.Position) + amount); + Vector3D p2 = new Vector3D(sidedef.Line.End.Position, originalplane.GetZ(sidedef.Line.End.Position) + amount); + Vector3D p3 = new Vector3D(((VisualSidedefSlope)pivothandle).Sidedef.Line.Line.GetCoordinatesAt(0.5), pivotplane.GetZ(((VisualSidedefSlope)pivothandle).Sidedef.Line.Line.GetCoordinatesAt(0.5))); Plane plane = new Plane(p1, p2, p3, true);