mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 04:12:12 +00:00
Fixed, Visual mode: ExtraFloor_LightOnly effect transferred brightness incorrectly (I broke this in r2236).
Changed, Visual mode: floors and ceilings with sky texture are now always rendered at full brightness.
This commit is contained in:
parent
7c8c36a01b
commit
02b902e20c
3 changed files with 17 additions and 5 deletions
|
@ -177,7 +177,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
// Go for all polygons
|
||||
int num = polygons.Count;
|
||||
Plane plane = (l.type == SectorLevelType.Ceiling ? l.plane : l.plane.GetInverted()); //mxd
|
||||
Plane plane = (l.type == SectorLevelType.Floor ? l.plane.GetInverted() : l.plane); //mxd
|
||||
|
||||
for(int pi = 0; pi < num; pi++)
|
||||
{
|
||||
|
|
|
@ -117,14 +117,20 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
else
|
||||
texscale = new Vector2D(1.0f / 64.0f, 1.0f / 64.0f);
|
||||
|
||||
//mxd. Sky is always bright
|
||||
int color;
|
||||
if(s.CeilTexture == General.Map.Config.SkyFlatName)
|
||||
color = -1; // That's white. With alpha. Not very impressive, eh?
|
||||
else
|
||||
color = (int)((level.color | General.Clamp(level.alpha, 0, 255) << 24) & 0xffffffff); // Byte offset shinanigans! Yay!
|
||||
|
||||
// Make vertices
|
||||
ReadOnlyCollection<Vector2D> triverts = base.Sector.Sector.Triangles.Vertices;
|
||||
WorldVertex[] verts = new WorldVertex[triverts.Count];
|
||||
for(int i = 0; i < triverts.Count; i++)
|
||||
{
|
||||
// Color shading
|
||||
PixelColor c = PixelColor.FromInt(level.color);
|
||||
verts[i].c = c.WithAlpha((byte)General.Clamp(level.alpha, 0, 255)).ToInt();
|
||||
verts[i].c = color; //mxd
|
||||
|
||||
// Vertex coordinates
|
||||
verts[i].x = triverts[i].x;
|
||||
|
|
|
@ -119,14 +119,20 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
else
|
||||
texscale = new Vector2D(1.0f / 64.0f, 1.0f / 64.0f);
|
||||
|
||||
//mxd. Sky is always bright
|
||||
int color;
|
||||
if(s.FloorTexture == General.Map.Config.SkyFlatName)
|
||||
color = -1; // That's white. With alpha. Not very impressive, eh?
|
||||
else
|
||||
color = (int)((level.color | General.Clamp(level.alpha, 0, 255) << 24) & 0xffffffff); // Byte offset shinanigans! Yay!
|
||||
|
||||
// Make vertices
|
||||
ReadOnlyCollection<Vector2D> triverts = base.Sector.Sector.Triangles.Vertices;
|
||||
WorldVertex[] verts = new WorldVertex[triverts.Count];
|
||||
for(int i = 0; i < triverts.Count; i++)
|
||||
{
|
||||
// Color shading
|
||||
PixelColor c = PixelColor.FromInt(level.color);
|
||||
verts[i].c = c.WithAlpha((byte)General.Clamp(level.alpha, 0, 255)).ToInt();
|
||||
verts[i].c = color; //mxd
|
||||
|
||||
// Vertex coordinates
|
||||
verts[i].x = triverts[i].x;
|
||||
|
|
Loading…
Reference in a new issue