mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2025-01-31 05:00:34 +00:00
Fixed, Visual mode: "Transfer Floor/Ceiling Brightness" actions were resetting sector color on target surfaces.
Updated ZDoom_DECORATE.cfg.
This commit is contained in:
parent
c170856409
commit
f8fb7eb057
3 changed files with 16 additions and 4 deletions
|
@ -811,6 +811,9 @@ constants
|
||||||
FBF_EXPLICITANGLE;
|
FBF_EXPLICITANGLE;
|
||||||
FBF_NOPITCH;
|
FBF_NOPITCH;
|
||||||
FBF_NORANDOMPUFFZ;
|
FBF_NORANDOMPUFFZ;
|
||||||
|
FBF_PUFFTARGET;
|
||||||
|
FBF_PUFFMASTER;
|
||||||
|
FBF_PUFFTRACER;
|
||||||
//monster flags
|
//monster flags
|
||||||
PAF_NOSKULLATTACK;
|
PAF_NOSKULLATTACK;
|
||||||
PAF_AIMFACING;
|
PAF_AIMFACING;
|
||||||
|
@ -1102,6 +1105,9 @@ constants
|
||||||
CBAF_NOPITCH;
|
CBAF_NOPITCH;
|
||||||
CBAF_NORANDOM;
|
CBAF_NORANDOM;
|
||||||
CBAF_NORANDOMPUFFZ;
|
CBAF_NORANDOMPUFFZ;
|
||||||
|
CBAF_PUFFTARGET;
|
||||||
|
CBAF_PUFFMASTER;
|
||||||
|
CBAF_PUFFTRACER;
|
||||||
CBF_NOLINES;
|
CBF_NOLINES;
|
||||||
CBF_SETTARGET;
|
CBF_SETTARGET;
|
||||||
CBF_SETMASTER;
|
CBF_SETMASTER;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#region === Copyright (c) 2015 MaxED ===
|
#region === Copyright (c) 2015 MaxED ===
|
||||||
|
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -31,8 +32,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
if(!sd.Updated) sd.Update();
|
if(!sd.Updated) sd.Update();
|
||||||
sd.AddUpdateSector(data.Sector, false);
|
sd.AddUpdateSector(data.Sector, false);
|
||||||
|
|
||||||
// Transfer ceiling brightness
|
// Transfer ceiling brightness, keep sector color
|
||||||
data.Ceiling.color = General.Map.Renderer3D.CalculateBrightness(sd.Sector.Brightness);
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#region === Copyright (c) 2015 MaxED ===
|
#region === Copyright (c) 2015 MaxED ===
|
||||||
|
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -31,8 +32,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
if(!sd.Updated) sd.Update();
|
if(!sd.Updated) sd.Update();
|
||||||
sd.AddUpdateSector(data.Sector, false);
|
sd.AddUpdateSector(data.Sector, false);
|
||||||
|
|
||||||
// Transfer floor brightness
|
// Transfer floor brightness, keep sector color
|
||||||
data.Floor.color = General.Map.Renderer3D.CalculateBrightness(sd.Sector.Brightness);
|
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;
|
data.Floor.brightnessbelow = sd.Floor.brightnessbelow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue