From c82ef4880c7ce2220aed474f04ac0d5addcb0872 Mon Sep 17 00:00:00 2001 From: ZZYZX Date: Tue, 10 May 2022 00:10:55 +0300 Subject: [PATCH] Fixed: Doom64 sector floor color was not applied to a sector below a 3D floor --- Source/Plugins/BuilderModes/VisualModes/SectorData.cs | 6 ++++-- Source/Plugins/BuilderModes/VisualModes/SectorLevel.cs | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Plugins/BuilderModes/VisualModes/SectorData.cs b/Source/Plugins/BuilderModes/VisualModes/SectorData.cs index 90f00fff..c8169c84 100755 --- a/Source/Plugins/BuilderModes/VisualModes/SectorData.cs +++ b/Source/Plugins/BuilderModes/VisualModes/SectorData.cs @@ -326,9 +326,11 @@ namespace CodeImp.DoomBuilder.BuilderModes floor.color = floorcolor.WithAlpha(255).ToInt(); floor.brightnessbelow = sector.Brightness; floor.colorbelow = lightcolor.WithAlpha(255); + floor.d64color = ColorFloor; ceiling.color = ceilingcolor.WithAlpha(255).ToInt(); ceiling.brightnessbelow = sector.Brightness; ceiling.colorbelow = lightcolor.WithAlpha(255); + ceiling.d64color = ColorCeiling; //mxd. Store a copy of initial settings floor.CopyProperties(floorbase); @@ -623,8 +625,8 @@ namespace CodeImp.DoomBuilder.BuilderModes brightness = PixelColor.FromInt(mode.CalculateBrightness(lightceiling)); else brightness = PixelColor.FromInt(mode.CalculateBrightness(src.brightnessbelow)); - - PixelColor color = PixelColor.Modulate(src.colorbelow, brightness); + + PixelColor color = PixelColor.Modulate(target.d64color, PixelColor.Modulate(src.colorbelow, brightness)); return color.WithAlpha(255).ToInt(); } diff --git a/Source/Plugins/BuilderModes/VisualModes/SectorLevel.cs b/Source/Plugins/BuilderModes/VisualModes/SectorLevel.cs index b282116c..ac32abac 100755 --- a/Source/Plugins/BuilderModes/VisualModes/SectorLevel.cs +++ b/Source/Plugins/BuilderModes/VisualModes/SectorLevel.cs @@ -33,6 +33,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // When this is 0, it takes the color from the sector above public int brightnessbelow; public PixelColor colorbelow; + public PixelColor d64color; // own color of the plane public bool disablelighting; //mxd public bool restrictlighting; //mxd public bool resetlighting; //mxd @@ -66,6 +67,7 @@ namespace CodeImp.DoomBuilder.BuilderModes target.color = this.color; target.brightnessbelow = this.brightnessbelow; target.colorbelow = this.colorbelow; + target.d64color = this.d64color; target.affectedbyglow = this.affectedbyglow; //mxd target.disablelighting = this.disablelighting; //mxd target.restrictlighting = this.restrictlighting; //mxd