mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 22:41:46 +00:00
Fixed a crash when saving a map with changed, but not recompiled SCRIPTS lump.
This commit is contained in:
parent
c06443c7d1
commit
b84e36b55a
1 changed files with 16 additions and 1 deletions
|
@ -1968,11 +1968,26 @@ namespace CodeImp.DoomBuilder
|
|||
foreach(MapLumpInfo lumpinfo in config.MapLumps.Values)
|
||||
{
|
||||
// Is this a script lump?
|
||||
if(lumpinfo.Script != null || lumpinfo.ScriptBuild)
|
||||
if(lumpinfo.Script != null)
|
||||
{
|
||||
// Compile it now
|
||||
success &= tempwadreader.CompileLump(lumpinfo.Name, lumpinfo.Script, errors);
|
||||
}
|
||||
//mxd. Is this ACS script?
|
||||
else if(lumpinfo.ScriptBuild)
|
||||
{
|
||||
// Compile it using selected script compiler
|
||||
ScriptConfiguration cfg = General.GetScriptConfiguration(ScriptType.ACS);
|
||||
if(cfg != null)
|
||||
{
|
||||
success &= tempwadreader.CompileLump(lumpinfo.Name, cfg, errors);
|
||||
}
|
||||
else
|
||||
{
|
||||
General.ErrorLogger.Add(ErrorType.Error, "Unable to compile \"" + lumpinfo.Name + "\" script lump: unable to find suitable Script Configuration!");
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return success;
|
||||
|
|
Loading…
Reference in a new issue