mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 04:12:12 +00:00
Fixed a compilation error in MapManager.cs when building solution in Release mode.
This commit is contained in:
parent
b8900b36dd
commit
b3713489d3
1 changed files with 19 additions and 20 deletions
|
@ -453,6 +453,7 @@ namespace CodeImp.DoomBuilder {
|
|||
|
||||
// Create map data
|
||||
MapSet newmap = new MapSet();
|
||||
WAD mapwad;
|
||||
|
||||
// Create temp wadfile
|
||||
string tempfile = General.MakeTempFilename(temppath);
|
||||
|
@ -462,25 +463,24 @@ namespace CodeImp.DoomBuilder {
|
|||
#if DEBUG
|
||||
tempwad = new WAD(tempfile);
|
||||
#else
|
||||
try { tempwad = new WAD(tempfile); }
|
||||
catch(Exception e)
|
||||
{
|
||||
General.ShowErrorMessage("Error while creating a temporary wad file:\n" + e.GetType().Name + ": " + e.Message, MessageBoxButtons.OK);
|
||||
return false;
|
||||
}
|
||||
try { tempwad = new WAD(tempfile); } catch(Exception e)
|
||||
{
|
||||
General.ShowErrorMessage("Error while creating a temporary wad file:\n" + e.GetType().Name + ": " + e.Message, MessageBoxButtons.OK);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Now open the map file
|
||||
General.WriteLogLine("Opening source file: " + filepathname);
|
||||
|
||||
#if DEBUG
|
||||
WAD mapwad = new WAD(filepathname, true);
|
||||
mapwad = new WAD(filepathname, true);
|
||||
#else
|
||||
try { mapwad = new WAD(filepathname, true); }
|
||||
catch(Exception e)
|
||||
{
|
||||
General.ShowErrorMessage("Error while opening source wad file:\n" + e.GetType().Name + ": " + e.Message, MessageBoxButtons.OK);
|
||||
return false;
|
||||
}
|
||||
try { mapwad = new WAD(filepathname, true); } catch(Exception e)
|
||||
{
|
||||
General.ShowErrorMessage("Error while opening source wad file:\n" + e.GetType().Name + ": " + e.Message, MessageBoxButtons.OK);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Copy the map lumps to the temp file
|
||||
|
@ -498,13 +498,12 @@ namespace CodeImp.DoomBuilder {
|
|||
#if DEBUG
|
||||
newmap = io.Read(newmap, TEMP_MAP_HEADER);
|
||||
#else
|
||||
try { newmap = io.Read(newmap, TEMP_MAP_HEADER); }
|
||||
catch(Exception e)
|
||||
{
|
||||
General.ErrorLogger.Add(ErrorType.Error, "Unable to read the map data structures with the specified configuration. " + e.GetType().Name + ": " + e.Message);
|
||||
General.ShowErrorMessage("Unable to read the map data structures with the specified configuration.", MessageBoxButtons.OK);
|
||||
return false;
|
||||
}
|
||||
try { newmap = io.Read(newmap, TEMP_MAP_HEADER); } catch(Exception e)
|
||||
{
|
||||
General.ErrorLogger.Add(ErrorType.Error, "Unable to read the map data structures with the specified configuration. " + e.GetType().Name + ": " + e.Message);
|
||||
General.ShowErrorMessage("Unable to read the map data structures with the specified configuration.", MessageBoxButtons.OK);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
newmap.EndAddRemove();
|
||||
|
||||
|
|
Loading…
Reference in a new issue