Skip to content
Snippets Groups Projects
Commit efcce489 authored by biwa's avatar biwa
Browse files

Visual Mode: fixed a problem where sloped 3D floors with an alpha value of...

Visual Mode: fixed a problem where sloped 3D floors with an alpha value of less than 128 were not shown at all instead of fully opaque. Fixes #954
parent 59197fdf
No related branches found
No related tags found
No related merge requests found
...@@ -157,10 +157,6 @@ namespace CodeImp.DoomBuilder.BuilderModes ...@@ -157,10 +157,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(sd.FloorGlow == null || !sd.FloorGlow.Fullbright) ceiling.color = 0; if(sd.FloorGlow == null || !sd.FloorGlow.Fullbright) ceiling.color = 0;
} }
// Apply alpha
floor.alpha = alpha;
ceiling.alpha = alpha;
//mxd //mxd
floor.extrafloor = true; floor.extrafloor = true;
ceiling.extrafloor = true; ceiling.extrafloor = true;
...@@ -171,9 +167,17 @@ namespace CodeImp.DoomBuilder.BuilderModes ...@@ -171,9 +167,17 @@ namespace CodeImp.DoomBuilder.BuilderModes
sloped3dfloor = ((alpha < 255 || renderadditive) && sloped3dfloor = ((alpha < 255 || renderadditive) &&
(Angle2D.RadToDeg(ceiling.plane.Normal.GetAngleZ()) != 270 || (Angle2D.RadToDeg(ceiling.plane.Normal.GetAngleZ()) != 270 ||
Angle2D.RadToDeg(floor.plane.Normal.GetAngleZ()) != 90)); Angle2D.RadToDeg(floor.plane.Normal.GetAngleZ()) != 90));
// As GZDoom doesn't support translucent 3D floors make is fully opaque
if (sloped3dfloor)
alpha = 255;
// Apply alpha
floor.alpha = alpha;
ceiling.alpha = alpha;
// Do not adjust light? (works only for non-vavoom types) // Do not adjust light? (works only for non-vavoom types)
if(!vavoomtype) if (!vavoomtype)
{ {
bool disablelighting = ((linedef.Args[2] & (int)Flags.DisableLighting) == (int)Flags.DisableLighting); //mxd bool disablelighting = ((linedef.Args[2] & (int)Flags.DisableLighting) == (int)Flags.DisableLighting); //mxd
bool restrictlighting = ((linedef.Args[2] & (int)Flags.RestrictLighting) == (int)Flags.RestrictLighting); //mxd bool restrictlighting = ((linedef.Args[2] & (int)Flags.RestrictLighting) == (int)Flags.RestrictLighting); //mxd
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment