mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-17 17:41:09 +00:00
Stair Sector Builder: properly snap new vertices to integer positions, if required
This commit is contained in:
parent
0a41dfd637
commit
a832e73a4a
1 changed files with 2 additions and 1 deletions
|
@ -1067,10 +1067,11 @@ namespace CodeImp.DoomBuilder.StairSectorBuilderMode
|
||||||
private DrawnVertex SectorVertex(double x, double y)
|
private DrawnVertex SectorVertex(double x, double y)
|
||||||
{
|
{
|
||||||
DrawnVertex v = new DrawnVertex();
|
DrawnVertex v = new DrawnVertex();
|
||||||
|
int precision = General.Settings.SnapToInteger ? 0 : General.Map.FormatInterface.VertexDecimals;
|
||||||
|
|
||||||
v.stitch = true;
|
v.stitch = true;
|
||||||
v.stitchline = 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;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue