Skip to content

Commit

Permalink
Missed a couple of necessary exceptions to the special cases added in…
Browse files Browse the repository at this point in the history
… Rend_SSectSkyFixes in the previous commit.
  • Loading branch information
danij-deng committed Aug 11, 2010
1 parent ef84138 commit 099d471
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doomsday/engine/portable/src/rend_main.c
Expand Up @@ -3043,7 +3043,8 @@ static void Rend_SSectSkyFixes(subsector_t *ssec)
if(top > bottom)
{
// Floor.
if(R_IsSkySurface(&frontsec->SP_floorsurface) && R_IsSkySurface(&backsec->SP_floorsurface) && bfloor > skyFloor)
if(R_IsSkySurface(&frontsec->SP_floorsurface) && R_IsSkySurface(&backsec->SP_floorsurface) &&
bfloor > skyFloor && !(bottom > ffloor))
{
vTL[VZ] = vTR[VZ] = MIN_OF(bfloor, bottom);
vBL[VZ] = vBR[VZ] = skyFloor;
Expand All @@ -3058,7 +3059,8 @@ static void Rend_SSectSkyFixes(subsector_t *ssec)
}

// Ceiling.
if(R_IsSkySurface(&frontsec->SP_ceilsurface) && R_IsSkySurface(&backsec->SP_ceilsurface) && bceil < skyCeil)
if(R_IsSkySurface(&frontsec->SP_ceilsurface) && R_IsSkySurface(&backsec->SP_ceilsurface) &&
bceil < skyCeil && !(top < fceil))
{
vTL[VZ] = vTR[VZ] = skyCeil;
vBL[VZ] = vBR[VZ] = MAX_OF(bceil, top);
Expand Down

0 comments on commit 099d471

Please sign in to comment.