diff --git a/Source/Core/Config/MapLumpInfo.cs b/Source/Core/Config/MapLumpInfo.cs index 76e168b952c9f570d362d344747f704d84ce9261..4865b221b3f67d9b74ac2ca77bcb400e3e4bb466 100644 --- a/Source/Core/Config/MapLumpInfo.cs +++ b/Source/Core/Config/MapLumpInfo.cs @@ -44,7 +44,7 @@ namespace CodeImp.DoomBuilder.Config this.NodeBuild = cfg.ReadSetting("maplumpnames." + name + ".nodebuild", false); this.AllowEmpty = cfg.ReadSetting("maplumpnames." + name + ".allowempty", false); this.ScriptBuild = cfg.ReadSetting("maplumpnames." + name + ".scriptbuild", false); //mxd - string scriptconfig = cfg.ReadSetting("maplumpnames." + name + ".script", ""); + string scriptconfig = (this.ScriptBuild ? string.Empty : cfg.ReadSetting("maplumpnames." + name + ".script", "")); //mxd. Setting Script when "scriptbuild" is true can result in unexpected behaviour... // Find script configuration if(scriptconfig.Length > 0) diff --git a/Source/Core/General/MapManager.cs b/Source/Core/General/MapManager.cs index cabdfc05b5b0b30dc106699f24a6ffb339f0e0a1..0f083b3f36d6c8976235f45226d7a1d6243c65da 100644 --- a/Source/Core/General/MapManager.cs +++ b/Source/Core/General/MapManager.cs @@ -753,9 +753,9 @@ namespace CodeImp.DoomBuilder // If the scripts window is open, save the scripts first if(IsScriptsWindowOpen) scriptwindow.Editor.ImplicitSave(); - // Only recompile scripts when the scripts have changed + // Only recompile scripts when the scripts have changed or there are compiler errors (mxd) // (not when only the map changed) - if(localscriptschanged && !CompileScriptLumps()) + if((localscriptschanged || errors.Count > 0) && !CompileScriptLumps()) { // Compiler failure if(errors.Count > 0)