Merge branch 'snapvertices'

This commit is contained in:
spherallic 2024-05-28 20:29:13 +02:00
commit 863af3290e
3 changed files with 8 additions and 4 deletions

View file

@ -3761,8 +3761,12 @@ namespace CodeImp.DoomBuilder.Map
/// <summary>This snaps all vertices to the map format accuracy. Call this to ensure the vertices are at valid coordinates.</summary>
public void SnapAllToAccuracy(bool usepreciseposition)
{
foreach(Vertex v in vertices) v.SnapToAccuracy(usepreciseposition);
foreach(Thing t in things) t.SnapToAccuracy(usepreciseposition);
// SRB2 doesn't support decimals for X/Y position, but does still require VertexDecimals for other float fields/values...
if (General.Map.Config.EngineName == "srb2")
usepreciseposition = false;
foreach (Vertex v in vertices) v.SnapToAccuracy(usepreciseposition);
foreach (Thing t in things) t.SnapToAccuracy(usepreciseposition);
}
/// <summary>This returns the next unused tag number.</summary>

View file

@ -726,7 +726,7 @@ namespace CodeImp.DoomBuilder.Map
// This snaps the vertex to the map format accuracy
public void SnapToAccuracy()
{
SnapToAccuracy(true);
SnapToAccuracy(!(General.Map.Config.EngineName == "srb2"));
}
// This snaps the vertex to the map format accuracy

View file

@ -283,7 +283,7 @@ namespace CodeImp.DoomBuilder.Map
// This snaps the vertex to the map format accuracy
public void SnapToAccuracy()
{
SnapToAccuracy(true);
SnapToAccuracy(!(General.Map.Config.EngineName == "srb2"));
}
// This snaps the vertex to the map format accuracy