This commit is contained in:
biwa 2022-05-09 23:16:21 +02:00
commit a1df690ae4
2 changed files with 6 additions and 2 deletions

View file

@ -326,9 +326,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
floor.color = floorcolor.WithAlpha(255).ToInt(); floor.color = floorcolor.WithAlpha(255).ToInt();
floor.brightnessbelow = sector.Brightness; floor.brightnessbelow = sector.Brightness;
floor.colorbelow = lightcolor.WithAlpha(255); floor.colorbelow = lightcolor.WithAlpha(255);
floor.d64color = ColorFloor;
ceiling.color = ceilingcolor.WithAlpha(255).ToInt(); ceiling.color = ceilingcolor.WithAlpha(255).ToInt();
ceiling.brightnessbelow = sector.Brightness; ceiling.brightnessbelow = sector.Brightness;
ceiling.colorbelow = lightcolor.WithAlpha(255); ceiling.colorbelow = lightcolor.WithAlpha(255);
ceiling.d64color = ColorCeiling;
//mxd. Store a copy of initial settings //mxd. Store a copy of initial settings
floor.CopyProperties(floorbase); floor.CopyProperties(floorbase);
@ -623,8 +625,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
brightness = PixelColor.FromInt(mode.CalculateBrightness(lightceiling)); brightness = PixelColor.FromInt(mode.CalculateBrightness(lightceiling));
else else
brightness = PixelColor.FromInt(mode.CalculateBrightness(src.brightnessbelow)); 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(); return color.WithAlpha(255).ToInt();
} }

View file

@ -33,6 +33,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// When this is 0, it takes the color from the sector above // When this is 0, it takes the color from the sector above
public int brightnessbelow; public int brightnessbelow;
public PixelColor colorbelow; public PixelColor colorbelow;
public PixelColor d64color; // own color of the plane
public bool disablelighting; //mxd public bool disablelighting; //mxd
public bool restrictlighting; //mxd public bool restrictlighting; //mxd
public bool resetlighting; //mxd public bool resetlighting; //mxd
@ -66,6 +67,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
target.color = this.color; target.color = this.color;
target.brightnessbelow = this.brightnessbelow; target.brightnessbelow = this.brightnessbelow;
target.colorbelow = this.colorbelow; target.colorbelow = this.colorbelow;
target.d64color = this.d64color;
target.affectedbyglow = this.affectedbyglow; //mxd target.affectedbyglow = this.affectedbyglow; //mxd
target.disablelighting = this.disablelighting; //mxd target.disablelighting = this.disablelighting; //mxd
target.restrictlighting = this.restrictlighting; //mxd target.restrictlighting = this.restrictlighting; //mxd