mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 04:12:12 +00:00
Fixed map lumps duplication when saving the map several times after converting the map from/to UDMF map format by changing it in the Map Options window.
Fixed, cosmetic: in some cases incorrect resource loading time was displayed after saving the map.
This commit is contained in:
parent
0a6a6bbd20
commit
4306e277e6
4 changed files with 17 additions and 3 deletions
|
@ -632,6 +632,12 @@ namespace CodeImp.DoomBuilder.Data
|
|||
imageque = null;
|
||||
mapinfo = null; //mxd
|
||||
}
|
||||
|
||||
//mxd. Called before Clock is reset
|
||||
internal void OnBeforeClockReset()
|
||||
{
|
||||
if(loadstarttime > 0) loadstarttime -= Clock.CurrentTime;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -817,6 +823,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
loadfinishtime = Clock.CurrentTime;
|
||||
string deltatimesec = ((loadfinishtime - loadstarttime) / 1000.0f).ToString("########0.00");
|
||||
General.WriteLogLine("Resources loading took " + deltatimesec + " seconds");
|
||||
loadstarttime = 0; //mxd
|
||||
|
||||
//mxd. Show more detailed message
|
||||
if(notifiedbusy)
|
||||
|
|
|
@ -1054,9 +1054,6 @@ namespace CodeImp.DoomBuilder
|
|||
// Ask the user to save changes (if any)
|
||||
if(AskSaveMap())
|
||||
{
|
||||
//mxd. Reset the clock...
|
||||
MainWindow.ResetClock();
|
||||
|
||||
// Open map options dialog
|
||||
MapOptionsForm optionswindow = new MapOptionsForm(newoptions, true);
|
||||
if(optionswindow.ShowDialog(mainwindow) == DialogResult.OK)
|
||||
|
@ -1115,6 +1112,9 @@ namespace CodeImp.DoomBuilder
|
|||
}
|
||||
else
|
||||
mainwindow.DisplayReady();
|
||||
|
||||
//mxd. Also reset the clock...
|
||||
MainWindow.ResetClock();
|
||||
|
||||
Cursor.Current = Cursors.Default;
|
||||
}
|
||||
|
|
|
@ -966,6 +966,9 @@ namespace CodeImp.DoomBuilder
|
|||
{
|
||||
ConfigurationInfo ci = General.GetConfigurationInfo(origmapconfigname);
|
||||
origcfg = new GameConfiguration(ci.Configuration);
|
||||
|
||||
// Needed only once!
|
||||
origmapconfigname = configinfo.Filename;
|
||||
}
|
||||
|
||||
mapheaderindex = CopyAllLumpsExceptMap(origwad, targetwad, origcfg, origmapname);
|
||||
|
|
|
@ -4201,6 +4201,10 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//mxd
|
||||
internal void ResetClock()
|
||||
{
|
||||
// Let the data manager know...
|
||||
if(General.Map != null && General.Map.Data != null)
|
||||
General.Map.Data.OnBeforeClockReset();
|
||||
|
||||
Clock.Reset();
|
||||
lastupdatetime = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue