diff --git a/Source/Core/Config/MatchingTextureSet.cs b/Source/Core/Config/MatchingTextureSet.cs
index 41cebca3..902b5fcb 100755
--- a/Source/Core/Config/MatchingTextureSet.cs
+++ b/Source/Core/Config/MatchingTextureSet.cs
@@ -140,7 +140,7 @@ namespace CodeImp.DoomBuilder.Config
internal bool AddTexture(ImageData image)
{
// Check against regex
- if(regex.IsMatch(image.Name.ToUpperInvariant()))
+ if(regex.IsMatch(image.ShortName.ToUpperInvariant()))
{
// Matches! Add it.
textures.Add(image);
@@ -158,7 +158,7 @@ namespace CodeImp.DoomBuilder.Config
internal bool AddFlat(ImageData image)
{
// Check against regex
- if(regex.IsMatch(image.Name.ToUpperInvariant()))
+ if(regex.IsMatch(image.ShortName.ToUpperInvariant()))
{
// Matches! Add it.
flats.Add(image);
@@ -174,7 +174,7 @@ namespace CodeImp.DoomBuilder.Config
// This only checks if the given image is a match
internal bool IsMatch(ImageData image)
{
- return regex.IsMatch(image.Name.ToUpperInvariant());
+ return regex.IsMatch(image.ShortName.ToUpperInvariant());
}
// This only checks if the given texture name is a match (mxd)
diff --git a/Source/Core/Types/FloatHandler.cs b/Source/Core/Types/FloatHandler.cs
index 61634d6c..fab04e03 100755
--- a/Source/Core/Types/FloatHandler.cs
+++ b/Source/Core/Types/FloatHandler.cs
@@ -32,7 +32,7 @@ namespace CodeImp.DoomBuilder.Types
#region ================== Variables
- private float value;
+ private double value;
#endregion
@@ -47,25 +47,25 @@ namespace CodeImp.DoomBuilder.Types
// Null?
if(value == null)
{
- this.value = 0.0f;
+ this.value = 0.0;
}
// Compatible type?
- else if((value is int) || (value is float) || (value is bool))
+ else if((value is int) || (value is float) || (value is double) || (value is bool))
{
// Set directly
- this.value = Convert.ToSingle(value);
+ this.value = Convert.ToDouble(value);
}
else
{
// Try parsing as string
- float result;
- if(float.TryParse(value.ToString(), NumberStyles.Float, CultureInfo.CurrentCulture, out result))
+ double result;
+ if(double.TryParse(value.ToString(), NumberStyles.Float, CultureInfo.CurrentCulture, out result))
{
this.value = result;
}
else
{
- this.value = 0.0f;
+ this.value = 0.0;
}
}
}
@@ -87,7 +87,7 @@ namespace CodeImp.DoomBuilder.Types
public override object GetDefaultValue()
{
- return 0f;
+ return 0.0;
}
#endregion
diff --git a/Source/Plugins/3DFloorMode/BuilderPlug.cs b/Source/Plugins/3DFloorMode/BuilderPlug.cs
index c698439c..68288e8f 100644
--- a/Source/Plugins/3DFloorMode/BuilderPlug.cs
+++ b/Source/Plugins/3DFloorMode/BuilderPlug.cs
@@ -929,6 +929,7 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
try
{
newtag = BuilderPlug.Me.ControlSectorArea.GetNewSectorTag(tagblacklist);
+ tagblacklist.Add(newtag);
}
catch (Exception e)
{
diff --git a/Source/Plugins/3DFloorMode/ThreeDFloor.cs b/Source/Plugins/3DFloorMode/ThreeDFloor.cs
index 4a58d3af..61cd1729 100644
--- a/Source/Plugins/3DFloorMode/ThreeDFloor.cs
+++ b/Source/Plugins/3DFloorMode/ThreeDFloor.cs
@@ -257,8 +257,11 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
// With multiple tag support in UDMF only one tag is needed, so bind it right away
if (General.Map.UDMF == true)
{
- if(isnew)
+ if (isnew)
+ {
udmftag = BuilderPlug.Me.ControlSectorArea.GetNewSectorTag(tagblacklist);
+ tagblacklist.Add(udmftag);
+ }
BindTag(udmftag);
}
diff --git a/Source/Plugins/3DFloorMode/Windows/ThreeDFloorEditorWindow.cs b/Source/Plugins/3DFloorMode/Windows/ThreeDFloorEditorWindow.cs
index 3b0967ea..abef9aab 100644
--- a/Source/Plugins/3DFloorMode/Windows/ThreeDFloorEditorWindow.cs
+++ b/Source/Plugins/3DFloorMode/Windows/ThreeDFloorEditorWindow.cs
@@ -111,12 +111,17 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
threeDFloorPanel.ScrollControlIntoView(dup);
}
+ ///
+ /// Splits the 3D floor, creating a new 3D floor for every checked sector
+ ///
+ /// The control for the 3D floor that's to be split
public void SplitThreeDFloor(ThreeDFloorHelperControl ctrl)
{
- var items = new List();
- var controls = new List();
+ List items = new List();
+ List controls = new List() { ctrl };
int numsplits = 0;
+ // Create a list of all checked sectors
for (int i = 0; i < ctrl.checkedListBoxSectors.Items.Count; i++)
{
if(ctrl.checkedListBoxSectors.GetItemCheckState(i) == CheckState.Checked)
@@ -134,39 +139,37 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
have to add exactly one additional control
*/
- controls.Add(ctrl);
-
if (items.Count == 1)
- {
numsplits = 1;
- }
else
- {
numsplits = items.Count - 1;
- }
+ // Get new controls for the additional 3D floors
for (int i = 0; i < numsplits; i++)
{
var newctrl = GetThreeDFloorControl();
newctrl.Update(ctrl);
- newctrl.Show();
-
controls.Add(newctrl);
}
+ // Update the ckeckboxes of the controls to reflect the split 3D floors
for (int i = controls.Count - 1; i >= 0 ; i--)
{
+ // Uncheck all sectors...
for (int j = 0; j < items.Count; j++)
- {
- controls[i].checkedListBoxSectors.SetItemChecked(j, false);
- }
+ controls[i].checkedListBoxSectors.SetItemChecked(items[j], false);
+ // ... and only check a single one
if (useitem >= 0)
controls[i].checkedListBoxSectors.SetItemChecked(items[useitem], true);
useitem--;
}
+
+ // Show the new controls
+ foreach (Control c in controls)
+ c.Show();
}
public void DetachThreeDFloor(ThreeDFloorHelperControl ctrl)