Skip to content

Commit

Permalink
do not apply the single color fill to vertically scrolling skies (#1231)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfomin authored Oct 20, 2023
1 parent 75ad948 commit 2473a6e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/r_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ static void do_draw_plane(visplane_t *pl)
{
int texture;
angle_t an, flip;
boolean vertically_scrolling = false;

// killough 10/98: allow skies to come from sidedefs.
// Allows scrolling and/or animated skies, as well as
Expand All @@ -354,6 +355,9 @@ static void do_draw_plane(visplane_t *pl)
// Sky transferred from first sidedef
const side_t *s = *l->sidenum + sides;

if (s->baserowoffset - s->oldrowoffset)
vertically_scrolling = true;

// Texture comes from upper texture of reference sidedef
texture = texturetranslation[s->toptexture];

Expand Down Expand Up @@ -401,7 +405,7 @@ static void do_draw_plane(visplane_t *pl)
dc_texturemid = dc_texturemid * dc_texheight / SKYSTRETCH_HEIGHT;
colfunc = R_DrawColumn;
}
else
else if (!vertically_scrolling)
{
// Make sure the fade-to-color effect doesn't happen too early
fixed_t diff = dc_texturemid - ORIGHEIGHT / 2 * FRACUNIT;
Expand Down

0 comments on commit 2473a6e

Please sign in to comment.