Skip to content

Commit

Permalink
Map Renderer|Fixed: HOM in BGComp.wad E1M4 near [x: 3710, y: 5366]
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Apr 24, 2012
1 parent 2e2b23a commit b7bcaeb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
13 changes: 9 additions & 4 deletions doomsday/engine/portable/src/r_world.c
Expand Up @@ -1445,20 +1445,25 @@ static material_t* chooseFixMaterial(SideDef* s, SideDefSection section)
{
if(section == SS_BOTTOM)
{
if(frontSec->SP_floorheight < backSec->SP_floorheight &&
frontSec->SP_ceilheight > backSec->SP_floorheight)
if(frontSec->SP_floorheight < backSec->SP_floorheight)
{
choice1 = backSec->SP_floormaterial;
}
}
else /* section == SS_TOP */
{
if(frontSec->SP_ceilheight > backSec->SP_ceilheight &&
frontSec->SP_floorheight < backSec->SP_ceilheight)
if(frontSec->SP_ceilheight > backSec->SP_ceilheight)
{
choice1 = backSec->SP_ceilmaterial;
}
}

// In the special case of sky mask on the back plane, our best
// choice is always this material.
if(choice1 && Material_IsSkyMasked(choice1))
{
return choice1;
}
}

// Our second choice is a material from this sector.
Expand Down
6 changes: 3 additions & 3 deletions doomsday/engine/portable/src/rend_main.c
Expand Up @@ -395,13 +395,13 @@ static void markSideDefSectionsPVisible(HEdge* hedge)

// Top.
if((!devRendSkyMode && Surface_IsSkyMasked(&fceil->surface) && Surface_IsSkyMasked(&bceil->surface)) ||
(!devRendSkyMode && Surface_IsSkyMasked(&bceil->surface) && (side->SW_topsurface.inFlags & SUIF_FIX_MISSING_MATERIAL)) ||
//(!devRendSkyMode && Surface_IsSkyMasked(&bceil->surface) && (side->SW_topsurface.inFlags & SUIF_FIX_MISSING_MATERIAL)) ||
(fceil->visHeight <= bceil->visHeight))
side->SW_topsurface .inFlags &= ~SUIF_PVIS;

// Bottom.
if((!devRendSkyMode && Surface_IsSkyMasked(&ffloor->surface) && Surface_IsSkyMasked(&bfloor->surface)) ||
(!devRendSkyMode && Surface_IsSkyMasked(&bfloor->surface) && (side->SW_bottomsurface.inFlags & SUIF_FIX_MISSING_MATERIAL)) ||
//(!devRendSkyMode && Surface_IsSkyMasked(&bfloor->surface) && (side->SW_bottomsurface.inFlags & SUIF_FIX_MISSING_MATERIAL)) ||
(ffloor->visHeight >= bfloor->visHeight))
side->SW_bottomsurface.inFlags &= ~SUIF_PVIS;
}
Expand Down Expand Up @@ -1418,7 +1418,7 @@ static boolean renderWorldPoly(rvertex_t* rvertices, uint numVertices,
if(shinyColors)
R_FreeRendColors(shinyColors);

return (p->forceOpaque ||
return (p->forceOpaque || (p->flags & RPF_SKYMASK) ||
!(p->alpha < 1 || !msA->isOpaque || p->blendMode > 0));
}

Expand Down

0 comments on commit b7bcaeb

Please sign in to comment.