diff --git a/Build/Scripting/ZDoom_DECORATE.cfg b/Build/Scripting/ZDoom_DECORATE.cfg index e3a2004b2379c949374abd2a2a85ff7ed7b53e14..dce418efe831fa283954ca74d5b25c50e4bf9a75 100644 --- a/Build/Scripting/ZDoom_DECORATE.cfg +++ b/Build/Scripting/ZDoom_DECORATE.cfg @@ -227,7 +227,7 @@ keywords A_DropInventory = "A_DropInventory(str type)"; A_DropItem = "A_DropItem(str item[, int dropamount = -1[, int chance = 256]])\nThe calling actor drops the specified item.\nThis works in a similar way to the DropItem actor property."; A_SelectWeapon = "A_SelectWeapon(str type)"; - A_RadiusGive = "A_RadiusGive(str item, fixed distance, int flags[, int amount = 0[, str filter = \"None\"[, str species = \"None\"]]])\nflags: RGF flags."; + A_RadiusGive = "A_RadiusGive(str item, fixed distance, int flags[, int amount = 0[, str filter = \"None\"[, str species = \"None\"[, fixed mindist = 0]]]])\nflags: RGF flags."; //Weapon functions A_WeaponReady = "A_WeaponReady[(int flags = 0)]\nflags: WRF flags."; A_Lower = "A_Lower"; diff --git a/Source/Core/GZBuilder/GZDoom/AcsParserSE.cs b/Source/Core/GZBuilder/GZDoom/AcsParserSE.cs index 6f062ceae6141bad69ffd45eca3c9dbfa52294fa..c56b711169d0bd16fd11231bcf2a2e37701b139c 100644 --- a/Source/Core/GZBuilder/GZDoom/AcsParserSE.cs +++ b/Source/Core/GZBuilder/GZDoom/AcsParserSE.cs @@ -48,13 +48,12 @@ namespace CodeImp.DoomBuilder.GZBuilder.GZDoom public bool Parse(Stream stream, string sourcefilename, List<string> configincludes, bool processincludes, bool isinclude) { - if(stream == null || stream.Length == 0) + // Integrity check + if(!base.Parse(stream, sourcefilename) || stream == null || stream.Length == 0) { ReportError("Unable to load " + (isinclude ? "include" : "") + " file '" + sourcefilename + "'!"); return false; } - - base.Parse(stream, sourcefilename); // Already parsed this? if(parsedlumps.Contains(sourcefilename)) return false; diff --git a/Source/Core/General/MapManager.cs b/Source/Core/General/MapManager.cs index 34a3cbc1f6c58f1c129cb9c318bc3b66f3c97f21..6eaa053d341c3aa8e1425b8cf4f3c3015feb0980 100644 --- a/Source/Core/General/MapManager.cs +++ b/Source/Core/General/MapManager.cs @@ -1911,7 +1911,7 @@ namespace CodeImp.DoomBuilder // Load the lump data MemoryStream stream = GetLumpData(maplumpinfo.Name); - if(stream != null && scriptconfig != null && scriptconfig.Compiler != null) + if(stream != null && stream.Length > 0 && scriptconfig != null && scriptconfig.Compiler != null) { // Get script names AcsParserSE parser = new AcsParserSE { OnInclude = UpdateScriptsFromLocation }; diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualThing.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualThing.cs index ce17ef779651726756bb8810892d96bc95952129..da269219a0baa6f054c6ca338a68b5a7b8705d7e 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualThing.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualThing.cs @@ -238,18 +238,14 @@ namespace CodeImp.DoomBuilder.BuilderModes else if(level.type == SectorLevelType.Glow) { // Interpolate thing brightness between glow and regular ones - float planez = level.plane.GetZ(thingpos); - SectorLevel nextlower = sd.GetLevelBelow(new Vector3D(thingpos, planez)); - - if(nextlower != null && nextlower.affectedbyglow) + if(sd.Floor != null && sd.FloorGlow != null) { // Get glow brightness - SectorData glowdata = (nextlower.sector != Thing.Sector ? mode.GetSectorData(nextlower.sector) : sd); - int glowbrightness = (level.type == SectorLevelType.Ceiling ? glowdata.CeilingGlow.Brightness : glowdata.FloorGlow.Brightness) / 2; - - float lowerz = nextlower.plane.GetZ(thingpos); - float delta = General.Clamp((thingpos.z - lowerz) / (planez - lowerz), 0f, 1f); - brightness = (int)((glowbrightness + nextlower.sector.Brightness / 2) * (1.0f - delta) + level.sector.Brightness * delta); + float glowz = level.plane.GetZ(thingpos); + float floorz = floor.GetZ(thingpos); + float delta = General.Clamp((thingpos.z - floorz) / (glowz - floorz), 0f, 1f); + + brightness = (int)((sd.FloorGlow.Brightness / 2 + sd.Floor.sector.Brightness / 2) * (1.0f - delta) + sd.Floor.sector.Brightness * delta); } }