diff --git a/Help/e_curvelinedefs.html b/Help/e_curvelinedefs.html index b0e3ca3a..be1138d4 100755 --- a/Help/e_curvelinedefs.html +++ b/Help/e_curvelinedefs.html @@ -32,6 +32,22 @@ Escape Discard the changes and return to the previous mode. + + Ctrl + Mousewheel + Increase/decrease the number of dividing vertices. + + + LMB + Drag + Change the distance of the curve (when Fixed Circular Curve is not set). + + + RMB + Drag + Change the angle of the curve. + + + Ctrl + Alt + RMB + Drag + When Fixed Circlar Curve is set, increase/decrease the dividing vertices together with the angle of the curve to maintain a consistent circular curve +

diff --git a/Source/Plugins/BuilderModes/ClassicModes/CurveLinedefsMode.cs b/Source/Plugins/BuilderModes/ClassicModes/CurveLinedefsMode.cs index 62b10977..b7d7fd66 100755 --- a/Source/Plugins/BuilderModes/ClassicModes/CurveLinedefsMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/CurveLinedefsMode.cs @@ -496,6 +496,7 @@ namespace CodeImp.DoomBuilder.BuilderModes else if(editpressed && prevoffset != 0) { int newangle = 0; + int newvertices = panel.Vertices; if(panel.FixedCurve) { // Flip required? @@ -513,7 +514,9 @@ namespace CodeImp.DoomBuilder.BuilderModes //TODO: there surely is a way to get new angle without iteration... double targetoffset = radius.GetLength() * u; double prevdiff = double.MaxValue; - int increment = (clampvalue ? panel.AngleIncrement : 1); + bool clampToKeyEllipseSegments = General.Interface.CtrlState && General.Interface.AltState; + + int increment = (clampToKeyEllipseSegments ? 15 : clampvalue ? panel.AngleIncrement : 1); for(int i = 1; i < panel.MaximumAngle; i += increment) { // Calculate diameter for current angle... @@ -530,7 +533,19 @@ namespace CodeImp.DoomBuilder.BuilderModes } // Clamp to 5 deg increments - if(clampvalue) newangle = (newangle / panel.AngleIncrement) * panel.AngleIncrement; + if(clampvalue) newangle = (newangle / increment) * increment; + + if(clampToKeyEllipseSegments) + { + newvertices = Math.Abs(newangle) / increment - 1; + + if(newvertices < 1) + newvertices = 1; + if(newangle < 30) + { + newangle = 0; + } + } } else { @@ -543,7 +558,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } // Set new angle without triggering the update... - panel.SetValues(panel.Vertices, panel.Distance, newangle, panel.FixedCurve, panel.FixedCurveOutwards); + panel.SetValues(newvertices, panel.Distance, newangle, panel.FixedCurve, panel.FixedCurveOutwards); // Update hint text hintlabel.Text = "Angle: " + panel.Angle; diff --git a/Source/Plugins/BuilderModes/Resources/Hints.cfg b/Source/Plugins/BuilderModes/Resources/Hints.cfg index 85317da9..ca703311 100755 --- a/Source/Plugins/BuilderModes/Resources/Hints.cfg +++ b/Source/Plugins/BuilderModes/Resources/Hints.cfg @@ -242,5 +242,6 @@ group general "LMB-drag or use buildermodes_increasebevel and buildermodes_decreasebevel to change curve depth. Hold Shift while dragging to change by 1 map unit" "RMB-drag or use buildermodes_rotateclockwise and buildermodes_rotatecounterclockwise to change curve bulginess. Hold Shift while dragging to change by 1 degree" "LMB+RMB-drag or use buildermodes_increasesubdivlevel and buildermodes_decreasesubdivlevel to change the number of points in the curve" +"When CTRL+ALT+RMB-drag When Fixed Circlar Curve is set, increase/decrease the dividing vertices together with the angle of the curve to maintain a consistent circular curve." "Press builder_acceptmode to accept" -"Press builder_cancelmode or builder_classicedit to cancel" \ No newline at end of file +"Press builder_cancelmode or builder_classicedit to cancel"