From 41d26c1d14d94e9bcbdc5579edea2141968d9ba0 Mon Sep 17 00:00:00 2001 From: spherallic Date: Tue, 14 Feb 2023 14:28:49 +0100 Subject: [PATCH] Some more fixes for angle loop handling --- Source/Core/GZBuilder/Controls/AngleControl.cs | 2 +- Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/GZBuilder/Controls/AngleControl.cs b/Source/Core/GZBuilder/Controls/AngleControl.cs index 41961e5..ae156d2 100644 --- a/Source/Core/GZBuilder/Controls/AngleControl.cs +++ b/Source/Core/GZBuilder/Controls/AngleControl.cs @@ -259,7 +259,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls if (e.Button == MouseButtons.Middle) { if ((ModifierKeys & Keys.Control) == Keys.Control) - thisAngle = angle%360; + thisAngle = angle%360 + (angle < 0 ? 360 : 0); else return; } diff --git a/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs b/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs index 32357f9..06ea0ab 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs @@ -851,9 +851,10 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Added special Polyobj Anchor handling and Doom angle clamping if(!fixedrotationthingtypes.Contains(t.SRB2Type)) { + int loops = (General.Map.SRB2) ? t.AngleDoom - (t.AngleDoom % 360) : 0; int newangle = Angle2D.RealToDoom(Angle2D.Normalized(newthingangle[index])); if(General.Map.Config.DoomThingRotationAngles) newangle = newangle / 45 * 45; - t.Rotate(newangle); + t.Rotate(newangle + loops); } index++;