Skip to content

Commit

Permalink
Fixed bug in Rend_DoesMidTextureFillGap which used the surface materi…
Browse files Browse the repository at this point in the history
…al X offset in place of the Y offset.

Fixed problem of wall surfaces using flat #0 always being marked as potentially visible in Rend_MarkSegSectionsPVisible.
  • Loading branch information
danij committed Oct 24, 2008
1 parent b1654ef commit 235ada0
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 @@ -545,7 +545,7 @@ boolean Rend_DoesMidTextureFillGap(linedef_t *line, int backside)
// Possibly. Check the placement of the mid texture.
if(Rend_MidTexturePos
(&gapBottom[0], &gapBottom[1], &gapTop[0], &gapTop[1],
NULL, side->SW_middlevisoffset[VX], mat->height,
NULL, side->SW_middlevisoffset[VY], mat->height,
0 != (line->flags & DDLF_DONTPEGBOTTOM)))
{
if(openTop[0] >= gapTop[0] &&
Expand Down Expand Up @@ -591,7 +591,9 @@ static void Rend_MarkSegSectionsPVisible(seg_t *seg)
else
{
// Check middle texture
if((!side->SW_middlematerial || side->SW_middlematerial->ofTypeID <= 0) || side->SW_middlergba[3] <= 0) // Check alpha
if((!side->SW_middlematerial ||
(side->SW_middlematerial->flags & MATF_NO_DRAW)) ||
side->SW_middlergba[3] <= 0) // Check alpha
side->sections[SEG_MIDDLE].frameFlags &= ~SUFINF_PVIS;

if(R_IsSkySurface(&line->L_backsector->SP_ceilsurface) &&
Expand Down

0 comments on commit 235ada0

Please sign in to comment.