mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-30 15:41:30 +00:00
- Reset default drawing textures when map options are changed
- Fixed some minor bugs in the choice of default drawing textures
This commit is contained in:
parent
2485c5b184
commit
e62146f464
2 changed files with 24 additions and 13 deletions
|
@ -425,6 +425,8 @@ namespace CodeImp.DoomBuilder.Config
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pick the first FLOOR from the list.
|
// Pick the first FLOOR from the list.
|
||||||
|
if(!foundone)
|
||||||
|
{
|
||||||
foreach(string s in General.Map.Data.FlatNames)
|
foreach(string s in General.Map.Data.FlatNames)
|
||||||
{
|
{
|
||||||
if(s.StartsWith("FLOOR"))
|
if(s.StartsWith("FLOOR"))
|
||||||
|
@ -434,6 +436,7 @@ namespace CodeImp.DoomBuilder.Config
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Otherwise just pick the first
|
// Otherwise just pick the first
|
||||||
if(!foundone)
|
if(!foundone)
|
||||||
|
@ -454,16 +457,19 @@ namespace CodeImp.DoomBuilder.Config
|
||||||
defaultceiltexture = General.GetByIndex(General.Map.Map.Sectors, 0).CeilTexture;
|
defaultceiltexture = General.GetByIndex(General.Map.Map.Sectors, 0).CeilTexture;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pick the first FLOOR from the list.
|
// Pick the first CEIL from the list.
|
||||||
|
if(!foundone)
|
||||||
|
{
|
||||||
foreach(string s in General.Map.Data.FlatNames)
|
foreach(string s in General.Map.Data.FlatNames)
|
||||||
{
|
{
|
||||||
if(s.StartsWith("FLOOR"))
|
if(s.StartsWith("CEIL"))
|
||||||
{
|
{
|
||||||
foundone = true;
|
foundone = true;
|
||||||
defaultceiltexture = s;
|
defaultceiltexture = s;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Otherwise just pick the first
|
// Otherwise just pick the first
|
||||||
if(!foundone)
|
if(!foundone)
|
||||||
|
|
|
@ -183,6 +183,11 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
options.StrictPatches = strictpatches.Checked;
|
options.StrictPatches = strictpatches.Checked;
|
||||||
options.CopyResources(datalocations.GetResources());
|
options.CopyResources(datalocations.GetResources());
|
||||||
|
|
||||||
|
// Reset default drawing textures
|
||||||
|
General.Settings.DefaultTexture = null;
|
||||||
|
General.Settings.DefaultFloorTexture = null;
|
||||||
|
General.Settings.DefaultCeilingTexture = null;
|
||||||
|
|
||||||
// Hide window
|
// Hide window
|
||||||
this.DialogResult = DialogResult.OK;
|
this.DialogResult = DialogResult.OK;
|
||||||
this.Close();
|
this.Close();
|
||||||
|
|
Loading…
Reference in a new issue