diff --git a/Build/Scripting/ZDoom_DECORATE.cfg b/Build/Scripting/ZDoom_DECORATE.cfg index 62cf2870..db7c0c9e 100644 --- a/Build/Scripting/ZDoom_DECORATE.cfg +++ b/Build/Scripting/ZDoom_DECORATE.cfg @@ -825,9 +825,9 @@ constants FBF_EXPLICITANGLE; FBF_NOPITCH; FBF_NORANDOMPUFFZ; - FBF_SETTARGET; - FBF_SETMASTER; - FBF_SETTRACER; + FBF_PUFFTARGET; + FBF_PUFFMASTER; + FBF_PUFFTRACER; //monster flags PAF_NOSKULLATTACK; PAF_AIMFACING; @@ -1120,9 +1120,9 @@ constants CBAF_NOPITCH; CBAF_NORANDOM; CBAF_NORANDOMPUFFZ; - CBAF_SETTARGET; - CBAF_SETMASTER; - CBAF_SETTRACER; + CBAF_PUFFTARGET; + CBAF_PUFFMASTER; + CBAF_PUFFTRACER; CBF_NOLINES; CBF_SETTARGET; CBF_SETMASTER; diff --git a/Source/Plugins/BuilderModes/VisualModes/EffectTransferCeilingBrightness.cs b/Source/Plugins/BuilderModes/VisualModes/EffectTransferCeilingBrightness.cs index 8d17224c..f783f7b0 100644 --- a/Source/Plugins/BuilderModes/VisualModes/EffectTransferCeilingBrightness.cs +++ b/Source/Plugins/BuilderModes/VisualModes/EffectTransferCeilingBrightness.cs @@ -1,6 +1,7 @@ #region === Copyright (c) 2015 MaxED === using CodeImp.DoomBuilder.Map; +using CodeImp.DoomBuilder.Rendering; #endregion @@ -31,8 +32,10 @@ namespace CodeImp.DoomBuilder.BuilderModes if(!sd.Updated) sd.Update(); sd.AddUpdateSector(data.Sector, false); - // Transfer ceiling brightness - data.Ceiling.color = General.Map.Renderer3D.CalculateBrightness(sd.Sector.Brightness); + // Transfer ceiling brightness, keep sector color + PixelColor lightcolor = PixelColor.FromInt(data.Sector.Fields.GetValue("lightcolor", -1)); + PixelColor brightness = PixelColor.FromInt(General.Map.Renderer3D.CalculateBrightness(sd.Sector.Brightness)); + data.Ceiling.color = PixelColor.Modulate(lightcolor, brightness).WithAlpha(255).ToInt(); } } } diff --git a/Source/Plugins/BuilderModes/VisualModes/EffectTransferFloorBrightness.cs b/Source/Plugins/BuilderModes/VisualModes/EffectTransferFloorBrightness.cs index 03d4b8fb..a6c86877 100644 --- a/Source/Plugins/BuilderModes/VisualModes/EffectTransferFloorBrightness.cs +++ b/Source/Plugins/BuilderModes/VisualModes/EffectTransferFloorBrightness.cs @@ -1,6 +1,7 @@ #region === Copyright (c) 2015 MaxED === using CodeImp.DoomBuilder.Map; +using CodeImp.DoomBuilder.Rendering; #endregion @@ -31,8 +32,10 @@ namespace CodeImp.DoomBuilder.BuilderModes if(!sd.Updated) sd.Update(); sd.AddUpdateSector(data.Sector, false); - // Transfer floor brightness - data.Floor.color = General.Map.Renderer3D.CalculateBrightness(sd.Sector.Brightness); + // Transfer floor brightness, keep sector color + PixelColor lightcolor = PixelColor.FromInt(data.Sector.Fields.GetValue("lightcolor", -1)); + PixelColor brightness = PixelColor.FromInt(General.Map.Renderer3D.CalculateBrightness(sd.Sector.Brightness)); + data.Floor.color = PixelColor.Modulate(lightcolor, brightness).WithAlpha(255).ToInt(); data.Floor.brightnessbelow = sd.Floor.brightnessbelow; } }