From fd41361f6df5d175855260c7b55bf8205969762b Mon Sep 17 00:00:00 2001 From: biwa <6475593+biwa@users.noreply.github.com> Date: Sat, 16 May 2020 13:22:33 +0200 Subject: [PATCH] Fixed an issue in Edit Selection Mode that could cause Out Of Memory exceptions with vertices that are slightly off grid in the 32 bit version --- Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs b/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs index 33551c6c..6cde59bb 100755 --- a/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs @@ -1725,6 +1725,10 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. We'll need sidedefs marked by StitchGeometry, not all sidedefs from selection... General.Map.Map.ClearMarkedSidedefs(false); + // Snap to map format accuracy. We need to do that before stitching geometry because vertices that are very very slightly off the grid (like 0.00001) can + // cause problems with BlockMapGetBlockCoordinates in the 32bit version + General.Map.Map.SnapAllToAccuracy(General.Map.UDMF && usepreciseposition); + // Stitch geometry General.Map.Map.StitchGeometry(General.Settings.MergeGeometryMode);