Some more fixes for angle loop handling

This commit is contained in:
spherallic 2023-02-14 14:28:49 +01:00
parent e3b2c25fb0
commit 41d26c1d14
2 changed files with 3 additions and 2 deletions

View file

@ -259,7 +259,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
if (e.Button == MouseButtons.Middle) if (e.Button == MouseButtons.Middle)
{ {
if ((ModifierKeys & Keys.Control) == Keys.Control) if ((ModifierKeys & Keys.Control) == Keys.Control)
thisAngle = angle%360; thisAngle = angle%360 + (angle < 0 ? 360 : 0);
else else
return; return;
} }

View file

@ -851,9 +851,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
//mxd. Added special Polyobj Anchor handling and Doom angle clamping //mxd. Added special Polyobj Anchor handling and Doom angle clamping
if(!fixedrotationthingtypes.Contains(t.SRB2Type)) if(!fixedrotationthingtypes.Contains(t.SRB2Type))
{ {
int loops = (General.Map.SRB2) ? t.AngleDoom - (t.AngleDoom % 360) : 0;
int newangle = Angle2D.RealToDoom(Angle2D.Normalized(newthingangle[index])); int newangle = Angle2D.RealToDoom(Angle2D.Normalized(newthingangle[index]));
if(General.Map.Config.DoomThingRotationAngles) newangle = newangle / 45 * 45; if(General.Map.Config.DoomThingRotationAngles) newangle = newangle / 45 * 45;
t.Rotate(newangle); t.Rotate(newangle + loops);
} }
index++; index++;