mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
Added "Split Joined Sectors" Edit menu item and toolbar button. When enabled, joined sectors adjacent to drawn lines will be split.
Added "doomthingrotationangles" Game Configuration property. When enabled, editor actions related to changing thing angle will snap the resulting angle to 45 degree increments. This property is set to true for vanilla game configurations. Fixed a crash when changing game configuration from one without Thing actions support to one with them while in Things mode. Fixed, cosmetic, DB2 bug: current editing mode button was deselected after reloading resources. Updated documentation ("Game Configuration - Basic Settings" page).
This commit is contained in:
parent
584d649839
commit
e34fe0d32f
25 changed files with 170 additions and 33 deletions
|
@ -32,6 +32,9 @@ include("Includes\\Game_Hexen.cfg");
|
||||||
//mxd. No DECORATE support in vanilla
|
//mxd. No DECORATE support in vanilla
|
||||||
decorategames = "";
|
decorategames = "";
|
||||||
|
|
||||||
|
//mxd. Don't do vanilla-style thing rotation angle clamping
|
||||||
|
doomthingrotationangles = false;
|
||||||
|
|
||||||
// Default thing filters
|
// Default thing filters
|
||||||
// (these are not required, just useful for new users)
|
// (these are not required, just useful for new users)
|
||||||
thingsfilters
|
thingsfilters
|
||||||
|
|
|
@ -17,6 +17,9 @@ common
|
||||||
defaultflatscale = 1.0f;
|
defaultflatscale = 1.0f;
|
||||||
scaledtextureoffsets = true;
|
scaledtextureoffsets = true;
|
||||||
|
|
||||||
|
//mxd. Do vanilla-style thing rotation angle clamping
|
||||||
|
doomthingrotationangles = true;
|
||||||
|
|
||||||
// Texture sources
|
// Texture sources
|
||||||
textures
|
textures
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,6 +45,9 @@ formatinterface = "SRB2MapSetIO";
|
||||||
//Maximum safe map size check (0 means skip check)
|
//Maximum safe map size check (0 means skip check)
|
||||||
safeboundary = 0;
|
safeboundary = 0;
|
||||||
|
|
||||||
|
//Don't do vanilla-style thing rotation angle clamping
|
||||||
|
doomthingrotationangles = false;
|
||||||
|
|
||||||
//Sky textures for vanilla maps
|
//Sky textures for vanilla maps
|
||||||
defaultskytextures
|
defaultskytextures
|
||||||
{
|
{
|
||||||
|
|
|
@ -151,9 +151,13 @@ damagetypes = "None BFGSplash Drowning Slime";
|
||||||
Arguments for the linedef action number to put on the lines when making a door.<br />
|
Arguments for the linedef action number to put on the lines when making a door.<br />
|
||||||
<br />
|
<br />
|
||||||
<b class="fat">doomlightlevels</b> (boolean)<br />
|
<b class="fat">doomlightlevels</b> (boolean)<br />
|
||||||
Set this to <b>false</b> to use linear lighting in Doom Builder. Normally Doom Builder uses a simulation of Doom's light levels. <br />
|
Set this to <b>false</b> to use linear lighting in Doom Builder. Normally Doom Builder uses a simulation of Doom's light levels.<br />
|
||||||
Default value is <b>true</b>.<br />
|
Default value is <b>true</b>.<br />
|
||||||
<br />
|
<br />
|
||||||
|
<b class="fat">doomthingrotationangles</b> (boolean) - <span class="red">GZDB only</span>.<br />
|
||||||
|
When set to <b>true</b>, editor actions related to changing thing angle will snap the resulting angle to 45 degree increments.<br />
|
||||||
|
Default value is <b>false</b>.<br />
|
||||||
|
<br />
|
||||||
<b class="fat">start3dmode</b> (integer)<br />
|
<b class="fat">start3dmode</b> (integer)<br />
|
||||||
Thing type number that Doom Builder will use to keep your Visual Mode camera position stored in the map. Doom Builder will place a single thing of this type in your map and move it along as you move in Visual Mode.<br />
|
Thing type number that Doom Builder will use to keep your Visual Mode camera position stored in the map. Doom Builder will place a single thing of this type in your map and move it along as you move in Visual Mode.<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
|
@ -1193,6 +1193,7 @@
|
||||||
<None Include="Resources\ModelDisabled.png" />
|
<None Include="Resources\ModelDisabled.png" />
|
||||||
<None Include="Resources\ModelFiltered.png" />
|
<None Include="Resources\ModelFiltered.png" />
|
||||||
<Content Include="Resources\Model_selected.png" />
|
<Content Include="Resources\Model_selected.png" />
|
||||||
|
<None Include="Resources\SplitSectors.png" />
|
||||||
<None Include="Resources\ScriptProperty.png" />
|
<None Include="Resources\ScriptProperty.png" />
|
||||||
<None Include="Resources\TextWhitespace.png" />
|
<None Include="Resources\TextWhitespace.png" />
|
||||||
<None Include="Resources\TextIndent.png" />
|
<None Include="Resources\TextIndent.png" />
|
||||||
|
|
|
@ -87,6 +87,7 @@ namespace CodeImp.DoomBuilder.Config
|
||||||
private readonly int bottomboundary;
|
private readonly int bottomboundary;
|
||||||
private readonly int safeboundary; //mxd
|
private readonly int safeboundary; //mxd
|
||||||
private readonly bool doomlightlevels;
|
private readonly bool doomlightlevels;
|
||||||
|
private readonly bool doomthingrotationangles; //mxd
|
||||||
private readonly string actionspecialhelp; //mxd
|
private readonly string actionspecialhelp; //mxd
|
||||||
private readonly string thingclasshelp; //mxd
|
private readonly string thingclasshelp; //mxd
|
||||||
private readonly bool sidedefcompressionignoresaction; //mxd
|
private readonly bool sidedefcompressionignoresaction; //mxd
|
||||||
|
@ -215,6 +216,7 @@ namespace CodeImp.DoomBuilder.Config
|
||||||
public int BottomBoundary { get { return bottomboundary; } }
|
public int BottomBoundary { get { return bottomboundary; } }
|
||||||
public int SafeBoundary { get { return safeboundary; } } //mxd
|
public int SafeBoundary { get { return safeboundary; } } //mxd
|
||||||
public bool DoomLightLevels { get { return doomlightlevels; } }
|
public bool DoomLightLevels { get { return doomlightlevels; } }
|
||||||
|
public bool DoomThingRotationAngles { get { return doomthingrotationangles; } } //mxd. When set to true, thing rotation angles will be clamped to the nearest 45 deg increment
|
||||||
public string ActionSpecialHelp { get { return actionspecialhelp; } } //mxd
|
public string ActionSpecialHelp { get { return actionspecialhelp; } } //mxd
|
||||||
public string ThingClassHelp { get { return thingclasshelp; } } //mxd
|
public string ThingClassHelp { get { return thingclasshelp; } } //mxd
|
||||||
internal bool SidedefCompressionIgnoresAction { get { return sidedefcompressionignoresaction; } } //mxd
|
internal bool SidedefCompressionIgnoresAction { get { return sidedefcompressionignoresaction; } } //mxd
|
||||||
|
@ -374,6 +376,7 @@ namespace CodeImp.DoomBuilder.Config
|
||||||
bottomboundary = cfg.ReadSetting("bottomboundary", -32768);
|
bottomboundary = cfg.ReadSetting("bottomboundary", -32768);
|
||||||
safeboundary = cfg.ReadSetting("safeboundary", 32767); //mxd
|
safeboundary = cfg.ReadSetting("safeboundary", 32767); //mxd
|
||||||
doomlightlevels = cfg.ReadSetting("doomlightlevels", true);
|
doomlightlevels = cfg.ReadSetting("doomlightlevels", true);
|
||||||
|
doomthingrotationangles = cfg.ReadSetting("doomthingrotationangles", false); //mxd
|
||||||
actionspecialhelp = cfg.ReadSetting("actionspecialhelp", string.Empty); //mxd
|
actionspecialhelp = cfg.ReadSetting("actionspecialhelp", string.Empty); //mxd
|
||||||
thingclasshelp = cfg.ReadSetting("thingclasshelp", string.Empty); //mxd
|
thingclasshelp = cfg.ReadSetting("thingclasshelp", string.Empty); //mxd
|
||||||
sidedefcompressionignoresaction = cfg.ReadSetting("sidedefcompressionignoresaction", false); //mxd
|
sidedefcompressionignoresaction = cfg.ReadSetting("sidedefcompressionignoresaction", false); //mxd
|
||||||
|
|
|
@ -92,6 +92,7 @@ namespace CodeImp.DoomBuilder.Config
|
||||||
private bool keeptexturefilterfocused; //mxd
|
private bool keeptexturefilterfocused; //mxd
|
||||||
private SplitLineBehavior splitlinebehavior; //mxd
|
private SplitLineBehavior splitlinebehavior; //mxd
|
||||||
private MergeGeometryMode mergegeomode; //mxd
|
private MergeGeometryMode mergegeomode; //mxd
|
||||||
|
private bool splitjoinedsectors; //mxd
|
||||||
private bool usehighlight; //mxd
|
private bool usehighlight; //mxd
|
||||||
private bool switchviewmodes; //mxd
|
private bool switchviewmodes; //mxd
|
||||||
|
|
||||||
|
@ -217,6 +218,7 @@ namespace CodeImp.DoomBuilder.Config
|
||||||
public bool KeepTextureFilterFocused { get { return keeptexturefilterfocused; } internal set { keeptexturefilterfocused = value; } } //mxd
|
public bool KeepTextureFilterFocused { get { return keeptexturefilterfocused; } internal set { keeptexturefilterfocused = value; } } //mxd
|
||||||
public SplitLineBehavior SplitLineBehavior { get { return splitlinebehavior; } set { splitlinebehavior = value; } } //mxd
|
public SplitLineBehavior SplitLineBehavior { get { return splitlinebehavior; } set { splitlinebehavior = value; } } //mxd
|
||||||
public MergeGeometryMode MergeGeometryMode { get { return mergegeomode; } internal set { mergegeomode = value; } } //mxd
|
public MergeGeometryMode MergeGeometryMode { get { return mergegeomode; } internal set { mergegeomode = value; } } //mxd
|
||||||
|
public bool SplitJoinedSectors { get { return splitjoinedsectors; } internal set { splitjoinedsectors = value; } } //mxd
|
||||||
|
|
||||||
//mxd. Highlight mode
|
//mxd. Highlight mode
|
||||||
public bool UseHighlight
|
public bool UseHighlight
|
||||||
|
@ -376,6 +378,7 @@ namespace CodeImp.DoomBuilder.Config
|
||||||
keeptexturefilterfocused = cfg.ReadSetting("keeptexturefilterfocused", true); //mxd
|
keeptexturefilterfocused = cfg.ReadSetting("keeptexturefilterfocused", true); //mxd
|
||||||
splitlinebehavior = (SplitLineBehavior)General.Clamp(cfg.ReadSetting("splitlinebehavior", 0), 0, Enum.GetValues(typeof(SplitLineBehavior)).Length - 1); //mxd
|
splitlinebehavior = (SplitLineBehavior)General.Clamp(cfg.ReadSetting("splitlinebehavior", 0), 0, Enum.GetValues(typeof(SplitLineBehavior)).Length - 1); //mxd
|
||||||
mergegeomode = (MergeGeometryMode)General.Clamp(cfg.ReadSetting("mergegeometrymode", (int)MergeGeometryMode.REPLACE), 0, Enum.GetValues(typeof(MergeGeometryMode)).Length - 1); //mxd
|
mergegeomode = (MergeGeometryMode)General.Clamp(cfg.ReadSetting("mergegeometrymode", (int)MergeGeometryMode.REPLACE), 0, Enum.GetValues(typeof(MergeGeometryMode)).Length - 1); //mxd
|
||||||
|
splitjoinedsectors = cfg.ReadSetting("splitjoinedsectors", true); //mxd
|
||||||
usehighlight = cfg.ReadSetting("usehighlight", true); //mxd
|
usehighlight = cfg.ReadSetting("usehighlight", true); //mxd
|
||||||
switchviewmodes = cfg.ReadSetting("switchviewmodes", false); //mxd
|
switchviewmodes = cfg.ReadSetting("switchviewmodes", false); //mxd
|
||||||
|
|
||||||
|
@ -502,6 +505,7 @@ namespace CodeImp.DoomBuilder.Config
|
||||||
cfg.WriteSetting("keeptexturefilterfocused", keeptexturefilterfocused); //mxd
|
cfg.WriteSetting("keeptexturefilterfocused", keeptexturefilterfocused); //mxd
|
||||||
cfg.WriteSetting("splitlinebehavior", (int)splitlinebehavior); //mxd
|
cfg.WriteSetting("splitlinebehavior", (int)splitlinebehavior); //mxd
|
||||||
cfg.WriteSetting("mergegeometrymode", (int)mergegeomode); //mxd
|
cfg.WriteSetting("mergegeometrymode", (int)mergegeomode); //mxd
|
||||||
|
cfg.WriteSetting("splitjoinedsectors", splitjoinedsectors); //mxd
|
||||||
cfg.WriteSetting("usehighlight", usehighlight); //mxd
|
cfg.WriteSetting("usehighlight", usehighlight); //mxd
|
||||||
cfg.WriteSetting("switchviewmodes", switchviewmodes); //mxd
|
cfg.WriteSetting("switchviewmodes", switchviewmodes); //mxd
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,8 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
|
||||||
|
|
||||||
private Point startClick; //JBR
|
private Point startClick; //JBR
|
||||||
|
|
||||||
|
private bool doomangleclamping;
|
||||||
|
|
||||||
//UI colors
|
//UI colors
|
||||||
private readonly Color fillColor = SystemColors.Window;
|
private readonly Color fillColor = SystemColors.Window;
|
||||||
private readonly Color fillInactiveColor = SystemColors.Control;
|
private readonly Color fillInactiveColor = SystemColors.Control;
|
||||||
|
@ -53,6 +55,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
|
||||||
|
|
||||||
public int Angle { get { return (angle == NO_ANGLE ? NO_ANGLE : angle - angleoffset); } set { angle = (value == NO_ANGLE ? NO_ANGLE : value + angleoffset); this.Refresh(); } }
|
public int Angle { get { return (angle == NO_ANGLE ? NO_ANGLE : angle - angleoffset); } set { angle = (value == NO_ANGLE ? NO_ANGLE : value + angleoffset); this.Refresh(); } }
|
||||||
public int AngleOffset { get { return angleoffset; } set { angleoffset = value; this.Refresh(); } }
|
public int AngleOffset { get { return angleoffset; } set { angleoffset = value; this.Refresh(); } }
|
||||||
|
public bool DoomAngleClamping { get { return doomangleclamping; } set { doomangleclamping = value; } }
|
||||||
public const int NO_ANGLE = int.MinValue;
|
public const int NO_ANGLE = int.MinValue;
|
||||||
|
|
||||||
[Description("Allow loop changing, setting to false will restore old behaviour.")]
|
[Description("Allow loop changing, setting to false will restore old behaviour.")]
|
||||||
|
@ -295,7 +298,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
|
||||||
startClick = new Point(e.X, e.Y);
|
startClick = new Point(e.X, e.Y);
|
||||||
int thisAngle = XYToDegrees(startClick, origin);
|
int thisAngle = XYToDegrees(startClick, origin);
|
||||||
|
|
||||||
if (e.Button == MouseButtons.Left)
|
if(e.Button == MouseButtons.Left || doomangleclamping)
|
||||||
{
|
{
|
||||||
thisAngle = (int)Math.Round(thisAngle / 45f) * 45;
|
thisAngle = (int)Math.Round(thisAngle / 45f) * 45;
|
||||||
if(thisAngle == 360) thisAngle = 0;
|
if(thisAngle == 360) thisAngle = 0;
|
||||||
|
|
|
@ -2394,7 +2394,13 @@ namespace CodeImp.DoomBuilder
|
||||||
General.Plugins.ReloadResources();
|
General.Plugins.ReloadResources();
|
||||||
|
|
||||||
// Inform editing mode that the resources are reloaded
|
// Inform editing mode that the resources are reloaded
|
||||||
if(General.Editing.Mode != null) General.Editing.Mode.OnReloadResources();
|
if(General.Editing.Mode != null)
|
||||||
|
{
|
||||||
|
General.Editing.Mode.OnReloadResources();
|
||||||
|
|
||||||
|
//mxd. Also Check appropriate button on interface
|
||||||
|
General.MainWindow.CheckEditModeButton(General.Editing.Mode.EditModeButtonName);
|
||||||
|
}
|
||||||
|
|
||||||
// Reset status
|
// Reset status
|
||||||
General.MainWindow.DisplayStatus(oldstatus);
|
General.MainWindow.DisplayStatus(oldstatus);
|
||||||
|
|
10
Source/Core/Properties/Resources.Designer.cs
generated
10
Source/Core/Properties/Resources.Designer.cs
generated
|
@ -1328,9 +1328,13 @@ namespace CodeImp.DoomBuilder.Properties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
internal static System.Drawing.Bitmap SplitSectors {
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
get {
|
||||||
/// </summary>
|
object obj = ResourceManager.GetObject("SplitSectors", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
internal static System.Drawing.Bitmap Status0 {
|
internal static System.Drawing.Bitmap Status0 {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("Status0", resourceCulture);
|
object obj = ResourceManager.GetObject("Status0", resourceCulture);
|
||||||
|
|
|
@ -607,6 +607,9 @@
|
||||||
<data name="MergeGeoRemoveLines" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="MergeGeoRemoveLines" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\MergeGeoRemoveLines.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\MergeGeoRemoveLines.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SplitSectors" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\SplitSectors.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="Snap1mp" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Snap1mp" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Snap1mp.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Snap1mp.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -529,6 +529,17 @@ toggleautomerge
|
||||||
allowscroll = true;
|
allowscroll = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mxd
|
||||||
|
togglejoinedsectorssplitting
|
||||||
|
{
|
||||||
|
title = "Split Joined Sectors";
|
||||||
|
category = "edit";
|
||||||
|
description = "When enabled, joined sectors adjacent to drawn lines will be split.";
|
||||||
|
allowkeys = true;
|
||||||
|
allowmouse = true;
|
||||||
|
allowscroll = true;
|
||||||
|
}
|
||||||
|
|
||||||
//mxd
|
//mxd
|
||||||
toggleautoclearsidetextures
|
toggleautoclearsidetextures
|
||||||
{
|
{
|
||||||
|
|
BIN
Source/Core/Resources/SplitSectors.png
Normal file
BIN
Source/Core/Resources/SplitSectors.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
30
Source/Core/Windows/MainForm.Designer.cs
generated
30
Source/Core/Windows/MainForm.Designer.cs
generated
|
@ -74,6 +74,7 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
this.itempastespecial = new System.Windows.Forms.ToolStripMenuItem();
|
this.itempastespecial = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.itemsnaptogrid = new System.Windows.Forms.ToolStripMenuItem();
|
this.itemsnaptogrid = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.itemautomerge = new System.Windows.Forms.ToolStripMenuItem();
|
this.itemautomerge = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.itemsplitjoinedsectors = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.itemautoclearsidetextures = new System.Windows.Forms.ToolStripMenuItem();
|
this.itemautoclearsidetextures = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.seperatoreditgeometry = new System.Windows.Forms.ToolStripSeparator();
|
this.seperatoreditgeometry = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.itemgridinc = new System.Windows.Forms.ToolStripMenuItem();
|
this.itemgridinc = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
@ -193,6 +194,7 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
this.buttonsnaptogrid = new System.Windows.Forms.ToolStripButton();
|
this.buttonsnaptogrid = new System.Windows.Forms.ToolStripButton();
|
||||||
this.buttontoggledynamicgrid = new System.Windows.Forms.ToolStripButton();
|
this.buttontoggledynamicgrid = new System.Windows.Forms.ToolStripButton();
|
||||||
this.buttonautomerge = new System.Windows.Forms.ToolStripButton();
|
this.buttonautomerge = new System.Windows.Forms.ToolStripButton();
|
||||||
|
this.buttonsplitjoinedsectors = new System.Windows.Forms.ToolStripButton();
|
||||||
this.buttonautoclearsidetextures = new System.Windows.Forms.ToolStripButton();
|
this.buttonautoclearsidetextures = new System.Windows.Forms.ToolStripButton();
|
||||||
this.buttontogglenightspath = new System.Windows.Forms.ToolStripButton();
|
this.buttontogglenightspath = new System.Windows.Forms.ToolStripButton();
|
||||||
this.seperatorgeometry = new System.Windows.Forms.ToolStripSeparator();
|
this.seperatorgeometry = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
@ -533,6 +535,7 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
this.itemsnaptogrid,
|
this.itemsnaptogrid,
|
||||||
this.itemdynamicgridsize,
|
this.itemdynamicgridsize,
|
||||||
this.itemautomerge,
|
this.itemautomerge,
|
||||||
|
this.itemsplitjoinedsectors,
|
||||||
this.itemautoclearsidetextures,
|
this.itemautoclearsidetextures,
|
||||||
this.seperatoreditgeometry,
|
this.seperatoreditgeometry,
|
||||||
this.itemgridinc,
|
this.itemgridinc,
|
||||||
|
@ -647,6 +650,17 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
this.itemautomerge.Text = "Snap to &Geometry";
|
this.itemautomerge.Text = "Snap to &Geometry";
|
||||||
this.itemautomerge.Click += new System.EventHandler(this.InvokeTaggedAction);
|
this.itemautomerge.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||||
//
|
//
|
||||||
|
// itemsplitjoinedsectors
|
||||||
|
//
|
||||||
|
this.itemsplitjoinedsectors.Checked = true;
|
||||||
|
this.itemsplitjoinedsectors.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
|
this.itemsplitjoinedsectors.Image = global::CodeImp.DoomBuilder.Properties.Resources.SplitSectors;
|
||||||
|
this.itemsplitjoinedsectors.Name = "itemsplitjoinedsectors";
|
||||||
|
this.itemsplitjoinedsectors.Size = new System.Drawing.Size(219, 22);
|
||||||
|
this.itemsplitjoinedsectors.Tag = "builder_togglejoinedsectorssplitting";
|
||||||
|
this.itemsplitjoinedsectors.Text = "Split &Joined Sectors when Drawing Lines";
|
||||||
|
this.itemsplitjoinedsectors.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||||
|
//
|
||||||
// itemautoclearsidetextures
|
// itemautoclearsidetextures
|
||||||
//
|
//
|
||||||
this.itemautoclearsidetextures.Checked = true;
|
this.itemautoclearsidetextures.Checked = true;
|
||||||
|
@ -1329,6 +1343,7 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
this.buttonsnaptogrid,
|
this.buttonsnaptogrid,
|
||||||
this.buttontoggledynamicgrid,
|
this.buttontoggledynamicgrid,
|
||||||
this.buttonautomerge,
|
this.buttonautomerge,
|
||||||
|
this.buttonsplitjoinedsectors,
|
||||||
this.buttonautoclearsidetextures,
|
this.buttonautoclearsidetextures,
|
||||||
this.buttontogglenightspath,
|
this.buttontogglenightspath,
|
||||||
this.seperatorgeometry,
|
this.seperatorgeometry,
|
||||||
|
@ -1844,6 +1859,19 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
this.buttonautomerge.Text = "Snap to Geometry";
|
this.buttonautomerge.Text = "Snap to Geometry";
|
||||||
this.buttonautomerge.Click += new System.EventHandler(this.InvokeTaggedAction);
|
this.buttonautomerge.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||||
//
|
//
|
||||||
|
// buttonsplitjoinedsectors
|
||||||
|
//
|
||||||
|
this.buttonsplitjoinedsectors.Checked = true;
|
||||||
|
this.buttonsplitjoinedsectors.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
|
this.buttonsplitjoinedsectors.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||||
|
this.buttonsplitjoinedsectors.Image = global::CodeImp.DoomBuilder.Properties.Resources.SplitSectors;
|
||||||
|
this.buttonsplitjoinedsectors.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
|
this.buttonsplitjoinedsectors.Name = "buttonsplitjoinedsectors";
|
||||||
|
this.buttonsplitjoinedsectors.Size = new System.Drawing.Size(23, 22);
|
||||||
|
this.buttonsplitjoinedsectors.Tag = "builder_togglejoinedsectorssplitting";
|
||||||
|
this.buttonsplitjoinedsectors.Text = "Split Joined Sectors when Drawing Lines";
|
||||||
|
this.buttonsplitjoinedsectors.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||||
|
//
|
||||||
// buttonautoclearsidetextures
|
// buttonautoclearsidetextures
|
||||||
//
|
//
|
||||||
this.buttonautoclearsidetextures.Checked = true;
|
this.buttonautoclearsidetextures.Checked = true;
|
||||||
|
@ -2754,6 +2782,8 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
private System.Windows.Forms.ToolStripMenuItem itemsnaptogrid;
|
private System.Windows.Forms.ToolStripMenuItem itemsnaptogrid;
|
||||||
private System.Windows.Forms.ToolStripButton buttonautomerge;
|
private System.Windows.Forms.ToolStripButton buttonautomerge;
|
||||||
private System.Windows.Forms.ToolStripMenuItem itemautomerge;
|
private System.Windows.Forms.ToolStripMenuItem itemautomerge;
|
||||||
|
private System.Windows.Forms.ToolStripButton buttonsplitjoinedsectors;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem itemsplitjoinedsectors;
|
||||||
private System.Windows.Forms.Timer processor;
|
private System.Windows.Forms.Timer processor;
|
||||||
private System.Windows.Forms.ToolStripSeparator separatorgzmodes;
|
private System.Windows.Forms.ToolStripSeparator separatorgzmodes;
|
||||||
private System.Windows.Forms.ToolStripSeparator seperatorfilesave;
|
private System.Windows.Forms.ToolStripSeparator seperatorfilesave;
|
||||||
|
|
|
@ -2107,6 +2107,8 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
buttontogglenightspath.Visible = maploaded && General.Map.SRB2;
|
buttontogglenightspath.Visible = maploaded && General.Map.SRB2;
|
||||||
buttontogglenightspath.Checked = General.Settings.RenderNiGHTSPath;
|
buttontogglenightspath.Checked = General.Settings.RenderNiGHTSPath;
|
||||||
buttonautomerge.Visible = General.Settings.ToolbarGeometry && maploaded;
|
buttonautomerge.Visible = General.Settings.ToolbarGeometry && maploaded;
|
||||||
|
buttonsplitjoinedsectors.Visible = General.Settings.ToolbarGeometry && maploaded; //mxd
|
||||||
|
buttonsplitjoinedsectors.Checked = General.Settings.SplitJoinedSectors; //mxd
|
||||||
buttonautoclearsidetextures.Visible = General.Settings.ToolbarGeometry && maploaded; //mxd
|
buttonautoclearsidetextures.Visible = General.Settings.ToolbarGeometry && maploaded; //mxd
|
||||||
buttontest.Visible = General.Settings.ToolbarTesting && maploaded;
|
buttontest.Visible = General.Settings.ToolbarTesting && maploaded;
|
||||||
|
|
||||||
|
@ -2747,6 +2749,7 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
itemcopy.Enabled = (General.Map != null) && (General.Editing.Mode != null) && General.Editing.Mode.Attributes.AllowCopyPaste;
|
itemcopy.Enabled = (General.Map != null) && (General.Editing.Mode != null) && General.Editing.Mode.Attributes.AllowCopyPaste;
|
||||||
itempaste.Enabled = (General.Map != null) && (General.Editing.Mode != null) && General.Editing.Mode.Attributes.AllowCopyPaste;
|
itempaste.Enabled = (General.Map != null) && (General.Editing.Mode != null) && General.Editing.Mode.Attributes.AllowCopyPaste;
|
||||||
itempastespecial.Enabled = (General.Map != null) && (General.Editing.Mode != null) && General.Editing.Mode.Attributes.AllowCopyPaste;
|
itempastespecial.Enabled = (General.Map != null) && (General.Editing.Mode != null) && General.Editing.Mode.Attributes.AllowCopyPaste;
|
||||||
|
itemsplitjoinedsectors.Checked = General.Settings.SplitJoinedSectors; //mxd
|
||||||
itemautoclearsidetextures.Checked = General.Settings.AutoClearSidedefTextures; //mxd
|
itemautoclearsidetextures.Checked = General.Settings.AutoClearSidedefTextures; //mxd
|
||||||
itemdynamicgridsize.Enabled = (General.Map != null); //mxd
|
itemdynamicgridsize.Enabled = (General.Map != null); //mxd
|
||||||
itemdynamicgridsize.Checked = General.Settings.DynamicGridSize; //mxd
|
itemdynamicgridsize.Checked = General.Settings.DynamicGridSize; //mxd
|
||||||
|
@ -2879,6 +2882,16 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
DisplayStatus(StatusType.Action, "Snap to geometry is " + (buttonautomerge.Checked ? "ENABLED" : "DISABLED"));
|
DisplayStatus(StatusType.Action, "Snap to geometry is " + (buttonautomerge.Checked ? "ENABLED" : "DISABLED"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mxd
|
||||||
|
[BeginAction("togglejoinedsectorssplitting")]
|
||||||
|
internal void ToggleJoinedSectorsSplitting()
|
||||||
|
{
|
||||||
|
buttonsplitjoinedsectors.Checked = !buttonsplitjoinedsectors.Checked;
|
||||||
|
itemsplitjoinedsectors.Checked = buttonsplitjoinedsectors.Checked;
|
||||||
|
General.Settings.SplitJoinedSectors = buttonsplitjoinedsectors.Checked;
|
||||||
|
DisplayStatus(StatusType.Action, "Joined sectors splitting is " + (General.Settings.SplitJoinedSectors ? "ENABLED" : "DISABLED"));
|
||||||
|
}
|
||||||
|
|
||||||
//mxd
|
//mxd
|
||||||
[BeginAction("togglebrightness")]
|
[BeginAction("togglebrightness")]
|
||||||
internal void ToggleBrightness()
|
internal void ToggleBrightness()
|
||||||
|
|
|
@ -115,6 +115,9 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
posZ.AllowDecimal = true;
|
posZ.AllowDecimal = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mxd. Use doom angle clamping?
|
||||||
|
anglecontrol.DoomAngleClamping = General.Map.Config.DoomThingRotationAngles;
|
||||||
|
|
||||||
//mxd. Arrange inteface
|
//mxd. Arrange inteface
|
||||||
int targetheight;
|
int targetheight;
|
||||||
if(General.Map.FormatInterface.HasThingAction)
|
if(General.Map.FormatInterface.HasThingAction)
|
||||||
|
@ -411,7 +414,12 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
foreach(Thing t in things)
|
foreach(Thing t in things)
|
||||||
{
|
{
|
||||||
// Coordination
|
// Coordination
|
||||||
if(cbRandomAngle.Checked) t.Rotate(General.Random(0, 359)); //mxd
|
if(cbRandomAngle.Checked) //mxd
|
||||||
|
{
|
||||||
|
int newangle = General.Random(0, 359);
|
||||||
|
if(General.Map.Config.DoomThingRotationAngles) newangle = newangle / 45 * 45;
|
||||||
|
t.Rotate(newangle);
|
||||||
|
}
|
||||||
|
|
||||||
//mxd. Check position
|
//mxd. Check position
|
||||||
float px = General.Clamp(t.Position.x, General.Map.Config.LeftBoundary, General.Map.Config.RightBoundary);
|
float px = General.Clamp(t.Position.x, General.Map.Config.LeftBoundary, General.Map.Config.RightBoundary);
|
||||||
|
|
|
@ -147,6 +147,9 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
posZ.AllowDecimal = true;
|
posZ.AllowDecimal = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mxd. Use doom angle clamping?
|
||||||
|
anglecontrol.DoomAngleClamping = General.Map.Config.DoomThingRotationAngles;
|
||||||
|
|
||||||
// Value linking
|
// Value linking
|
||||||
scale.LinkValues = linkscale;
|
scale.LinkValues = linkscale;
|
||||||
|
|
||||||
|
@ -461,7 +464,12 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
{
|
{
|
||||||
// Coordination
|
// Coordination
|
||||||
//mxd. Randomize rotations?
|
//mxd. Randomize rotations?
|
||||||
if(cbrandomangle.Checked) t.Rotate(General.Random(0, 359));
|
if(cbrandomangle.Checked)
|
||||||
|
{
|
||||||
|
int newangle = General.Random(0, 359);
|
||||||
|
if(General.Map.Config.DoomThingRotationAngles) newangle = newangle / 45 * 45;
|
||||||
|
t.Rotate(newangle);
|
||||||
|
}
|
||||||
if(cbrandompitch.Checked) t.SetPitch(General.Random(0, 359));
|
if(cbrandompitch.Checked) t.SetPitch(General.Random(0, 359));
|
||||||
if(cbrandomroll.Checked) t.SetRoll(General.Random(0, 359));
|
if(cbrandomroll.Checked) t.SetRoll(General.Random(0, 359));
|
||||||
|
|
||||||
|
|
|
@ -201,9 +201,13 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
||||||
private void ApplyRotation(int ammount)
|
private void ApplyRotation(int ammount)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < selection.Count; i++)
|
for(int i = 0; i < selection.Count; i++)
|
||||||
selection[i].Rotate((int)((thingData[i].Angle + ammount * thingData[i].JitterRotation) % 360));
|
{
|
||||||
|
int newangle = (int)Math.Round(thingData[i].Angle + ammount * thingData[i].JitterRotation);
|
||||||
|
if(General.Map.Config.DoomThingRotationAngles) newangle = newangle / 45 * 45;
|
||||||
|
selection[i].Rotate(newangle % 360);
|
||||||
|
}
|
||||||
|
|
||||||
//update view
|
// Update view
|
||||||
if(editingModeName == "ThingsMode") General.Interface.RedrawDisplay();
|
if(editingModeName == "ThingsMode") General.Interface.RedrawDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -249,7 +249,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
General.Map.Map.Update();
|
General.Map.Map.Update();
|
||||||
|
|
||||||
//mxd. Outer sectors may require some splittin...
|
//mxd. Outer sectors may require some splittin...
|
||||||
Tools.SplitOuterSectors(General.Map.Map.GetMarkedLinedefs(true));
|
if(General.Settings.SplitJoinedSectors) Tools.SplitOuterSectors(General.Map.Map.GetMarkedLinedefs(true));
|
||||||
|
|
||||||
// Edit new sectors?
|
// Edit new sectors?
|
||||||
List<Sector> newsectors = General.Map.Map.GetMarkedSectors(true);
|
List<Sector> newsectors = General.Map.Map.GetMarkedSectors(true);
|
||||||
|
|
|
@ -781,7 +781,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
General.Map.Map.Update();
|
General.Map.Map.Update();
|
||||||
|
|
||||||
//mxd. Outer sectors may require some splittin...
|
//mxd. Outer sectors may require some splittin...
|
||||||
Tools.SplitOuterSectors(General.Map.Map.GetMarkedLinedefs(true));
|
if(General.Settings.SplitJoinedSectors) Tools.SplitOuterSectors(General.Map.Map.GetMarkedLinedefs(true));
|
||||||
|
|
||||||
// Edit new sectors?
|
// Edit new sectors?
|
||||||
List<Sector> newsectors = General.Map.Map.GetMarkedSectors(true);
|
List<Sector> newsectors = General.Map.Map.GetMarkedSectors(true);
|
||||||
|
|
|
@ -115,7 +115,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
General.Map.Map.ClearAllSelected();
|
General.Map.Map.ClearAllSelected();
|
||||||
|
|
||||||
//mxd. Outer sectors may require some splittin...
|
//mxd. Outer sectors may require some splittin...
|
||||||
Tools.SplitOuterSectors(General.Map.Map.GetMarkedLinedefs(true));
|
if(General.Settings.SplitJoinedSectors) Tools.SplitOuterSectors(General.Map.Map.GetMarkedLinedefs(true));
|
||||||
|
|
||||||
// Edit new sectors?
|
// Edit new sectors?
|
||||||
if(BuilderPlug.Me.EditNewSector && (newsectors.Count > 0))
|
if(BuilderPlug.Me.EditNewSector && (newsectors.Count > 0))
|
||||||
|
|
|
@ -386,7 +386,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
General.Map.Map.Update();
|
General.Map.Map.Update();
|
||||||
|
|
||||||
//mxd. Outer sectors may require some splittin...
|
//mxd. Outer sectors may require some splittin...
|
||||||
Tools.SplitOuterSectors(General.Map.Map.GetMarkedLinedefs(true));
|
if(General.Settings.SplitJoinedSectors) Tools.SplitOuterSectors(General.Map.Map.GetMarkedLinedefs(true));
|
||||||
|
|
||||||
// Edit new sectors?
|
// Edit new sectors?
|
||||||
List<Sector> newsectors = General.Map.Map.GetMarkedSectors(true);
|
List<Sector> newsectors = General.Map.Map.GetMarkedSectors(true);
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using CodeImp.DoomBuilder.Actions;
|
using CodeImp.DoomBuilder.Actions;
|
||||||
|
@ -849,8 +848,14 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
index = 0;
|
index = 0;
|
||||||
foreach(Thing t in selectedthings)
|
foreach(Thing t in selectedthings)
|
||||||
{
|
{
|
||||||
if(!fixedrotationthingtypes.Contains(t.SRB2Type) && newthingangle[index] != thingangle[index]) //mxd. Polyobject Anchors, I hate you!
|
//mxd. Added special Polyobj Anchor handling and Doom angle clamping
|
||||||
t.Rotate(Angle2D.Normalized(newthingangle[index]));
|
if(!fixedrotationthingtypes.Contains(t.SRB2Type))
|
||||||
|
{
|
||||||
|
int newangle = Angle2D.RealToDoom(Angle2D.Normalized(newthingangle[index]));
|
||||||
|
if(General.Map.Config.DoomThingRotationAngles) newangle = newangle / 45 * 45;
|
||||||
|
t.Rotate(newangle);
|
||||||
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -284,6 +284,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
//mxd. Render sector tag labels
|
//mxd. Render sector tag labels
|
||||||
if(BuilderPlug.Me.ViewSelectionEffects && General.Map.FormatInterface.HasThingAction)
|
if(BuilderPlug.Me.ViewSelectionEffects && General.Map.FormatInterface.HasThingAction)
|
||||||
{
|
{
|
||||||
|
//mxd. sectorlabels will be null after switching map configuration from one
|
||||||
|
// without ThingAction to one with it while in Things mode
|
||||||
|
if(sectorlabels == null) SetupSectorLabels();
|
||||||
|
|
||||||
List<ITextLabel> torender = new List<ITextLabel>(sectorlabels.Count);
|
List<ITextLabel> torender = new List<ITextLabel>(sectorlabels.Count);
|
||||||
foreach(KeyValuePair<Sector, string[]> group in sectortexts)
|
foreach(KeyValuePair<Sector, string[]> group in sectortexts)
|
||||||
{
|
{
|
||||||
|
@ -1558,25 +1562,33 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
General.Interface.DisplayStatus(StatusType.Action, "Rotated a thing.");
|
General.Interface.DisplayStatus(StatusType.Action, "Rotated a thing.");
|
||||||
}
|
}
|
||||||
|
|
||||||
//change angle
|
// Change angle
|
||||||
if(General.Interface.CtrlState) //point away
|
if(General.Interface.CtrlState) // Point away
|
||||||
{
|
{
|
||||||
foreach(Thing t in selected)
|
foreach(Thing t in selected)
|
||||||
{
|
{
|
||||||
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.SRB2Type);
|
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||||
if(info == null || info.Category == null || info.Category.Arrow == 0)
|
if(info == null || info.Category == null || info.Category.Arrow == 0)
|
||||||
continue;
|
continue;
|
||||||
t.Rotate(Vector2D.GetAngle(mousemappos, t.Position) + Angle2D.PI);
|
|
||||||
|
int newangle = Angle2D.RealToDoom(Vector2D.GetAngle(mousemappos, t.Position) + Angle2D.PI);
|
||||||
|
if(General.Map.Config.DoomThingRotationAngles) newangle = (newangle + 22) / 45 * 45;
|
||||||
|
|
||||||
|
t.Rotate(newangle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else //point at
|
else // Point at cursor
|
||||||
{
|
{
|
||||||
foreach(Thing t in selected)
|
foreach(Thing t in selected)
|
||||||
{
|
{
|
||||||
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.SRB2Type);
|
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||||
if(info == null || info.Category == null || info.Category.Arrow == 0)
|
if(info == null || info.Category == null || info.Category.Arrow == 0)
|
||||||
continue;
|
continue;
|
||||||
t.Rotate(Vector2D.GetAngle(mousemappos, t.Position));
|
|
||||||
|
int newangle = Angle2D.RealToDoom(Vector2D.GetAngle(mousemappos, t.Position));
|
||||||
|
if(General.Map.Config.DoomThingRotationAngles) newangle = (newangle + 22) / 45 * 45;
|
||||||
|
|
||||||
|
t.Rotate(newangle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1601,14 +1613,14 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
[BeginAction("rotateclockwise")]
|
[BeginAction("rotateclockwise")]
|
||||||
public void RotateCW()
|
public void RotateCW()
|
||||||
{
|
{
|
||||||
RotateThings(-5);
|
RotateThings(General.Map.Config.DoomThingRotationAngles ? -45 : -5);
|
||||||
}
|
}
|
||||||
|
|
||||||
//mxd. rotate counterclockwise
|
//mxd. rotate counterclockwise
|
||||||
[BeginAction("rotatecounterclockwise")]
|
[BeginAction("rotatecounterclockwise")]
|
||||||
public void RotateCCW()
|
public void RotateCCW()
|
||||||
{
|
{
|
||||||
RotateThings(5);
|
RotateThings(General.Map.Config.DoomThingRotationAngles ? 45 : 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
//mxd
|
//mxd
|
||||||
|
@ -1637,8 +1649,14 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
General.Interface.DisplayStatus(StatusType.Action, "Rotated a thing.");
|
General.Interface.DisplayStatus(StatusType.Action, "Rotated a thing.");
|
||||||
}
|
}
|
||||||
|
|
||||||
//change angle
|
// Change angle
|
||||||
foreach(Thing t in selected) t.Rotate(General.ClampAngle(t.AngleDoom + increment));
|
foreach(Thing t in selected)
|
||||||
|
{
|
||||||
|
int newangle = t.AngleDoom + increment;
|
||||||
|
if(General.Map.Config.DoomThingRotationAngles) newangle = (newangle + 22) / 45 * 45;
|
||||||
|
|
||||||
|
t.Rotate(General.ClampAngle(newangle));
|
||||||
|
}
|
||||||
|
|
||||||
// Redraw screen
|
// Redraw screen
|
||||||
General.Interface.RedrawDisplay();
|
General.Interface.RedrawDisplay();
|
||||||
|
|
|
@ -3519,18 +3519,18 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
[BeginAction("rotateclockwise")]
|
[BeginAction("rotateclockwise")]
|
||||||
public void RotateCW()
|
public void RotateCW()
|
||||||
{
|
{
|
||||||
RotateThingsAndTextures(5);
|
RotateThingsAndTextures(General.Map.Config.DoomThingRotationAngles ? 45 : 5, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
//mxd. Rotate counterclockwise
|
//mxd. Rotate counterclockwise
|
||||||
[BeginAction("rotatecounterclockwise")]
|
[BeginAction("rotatecounterclockwise")]
|
||||||
public void RotateCCW()
|
public void RotateCCW()
|
||||||
{
|
{
|
||||||
RotateThingsAndTextures(-5);
|
RotateThingsAndTextures(General.Map.Config.DoomThingRotationAngles ? -45 : -5, - 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
//mxd
|
//mxd
|
||||||
private void RotateThingsAndTextures(int increment)
|
private void RotateThingsAndTextures(int thingangleincrement, int textureangleincrement)
|
||||||
{
|
{
|
||||||
PreAction(UndoGroup.ThingAngleChange);
|
PreAction(UndoGroup.ThingAngleChange);
|
||||||
|
|
||||||
|
@ -3542,7 +3542,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
if(obj is BaseVisualThing)
|
if(obj is BaseVisualThing)
|
||||||
{
|
{
|
||||||
BaseVisualThing t = (BaseVisualThing)obj;
|
BaseVisualThing t = (BaseVisualThing)obj;
|
||||||
t.SetAngle(General.ClampAngle(t.Thing.AngleDoom + increment));
|
|
||||||
|
int newangle = t.Thing.AngleDoom + thingangleincrement;
|
||||||
|
if(General.Map.Config.DoomThingRotationAngles) newangle = newangle / 45 * 45;
|
||||||
|
t.SetAngle(General.ClampAngle(newangle));
|
||||||
|
|
||||||
// Visual sectors may be affected by this thing...
|
// Visual sectors may be affected by this thing...
|
||||||
if(thingdata.ContainsKey(t.Thing))
|
if(thingdata.ContainsKey(t.Thing))
|
||||||
|
@ -3562,12 +3565,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
else if(obj is VisualFloor)
|
else if(obj is VisualFloor)
|
||||||
{
|
{
|
||||||
VisualFloor vf = (VisualFloor)obj;
|
VisualFloor vf = (VisualFloor)obj;
|
||||||
vf.OnChangeTextureRotation(General.ClampAngle(vf.GetControlSector().Fields.GetValue("rotationfloor", 0.0f) + increment));
|
vf.OnChangeTextureRotation(General.ClampAngle(vf.GetControlSector().Fields.GetValue("rotationfloor", 0.0f) + textureangleincrement));
|
||||||
}
|
}
|
||||||
else if(obj is VisualCeiling)
|
else if(obj is VisualCeiling)
|
||||||
{
|
{
|
||||||
VisualCeiling vc = (VisualCeiling)obj;
|
VisualCeiling vc = (VisualCeiling)obj;
|
||||||
vc.OnChangeTextureRotation(General.ClampAngle(vc.GetControlSector().Fields.GetValue("rotationceiling", 0.0f) + increment));
|
vc.OnChangeTextureRotation(General.ClampAngle(vc.GetControlSector().Fields.GetValue("rotationceiling", 0.0f) + textureangleincrement));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue