From a832e73a4a062d3d5cb9e087f8525c7aa96cedba Mon Sep 17 00:00:00 2001 From: spherallic Date: Tue, 18 Jun 2024 13:54:54 +0200 Subject: [PATCH] Stair Sector Builder: properly snap new vertices to integer positions, if required --- Source/Plugins/StairSectorBuilder/StairSectorBuilderMode.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Plugins/StairSectorBuilder/StairSectorBuilderMode.cs b/Source/Plugins/StairSectorBuilder/StairSectorBuilderMode.cs index 3e4f98e4..2ef625d6 100755 --- a/Source/Plugins/StairSectorBuilder/StairSectorBuilderMode.cs +++ b/Source/Plugins/StairSectorBuilder/StairSectorBuilderMode.cs @@ -1067,10 +1067,11 @@ namespace CodeImp.DoomBuilder.StairSectorBuilderMode private DrawnVertex SectorVertex(double x, double y) { DrawnVertex v = new DrawnVertex(); + int precision = General.Settings.SnapToInteger ? 0 : General.Map.FormatInterface.VertexDecimals; v.stitch = true; v.stitchline = true; - v.pos = new Vector2D(Math.Round(x, General.Map.FormatInterface.VertexDecimals), Math.Round(y, General.Map.FormatInterface.VertexDecimals)); + v.pos = new Vector2D(Math.Round(x, precision), Math.Round(y, precision)); return v; }