- Fixed: r4220 broke 3D floor rendering, because 3D floors have the floor and ceiling orientations

reversed compared to normal conventions.

SVN r4225 (trunk)
This commit is contained in:
Randy Heit 2013-04-23 03:51:51 +00:00
parent 92d54ca0fc
commit 6921a3edc2
1 changed files with 11 additions and 3 deletions

View File

@ -2242,10 +2242,18 @@ void R_NewWall (bool needlights)
// killough 3/7/98: add deep water check // killough 3/7/98: add deep water check
if (frontsector->GetHeightSec() == NULL) if (frontsector->GetHeightSec() == NULL)
{ {
if (frontsector->floorplane.PointOnSide(viewx, viewy, viewz) <= 0) // above view plane int planeside;
planeside = frontsector->floorplane.PointOnSide(viewx, viewy, viewz);
if (frontsector->floorplane.c < 0) // 3D floors have the floor backwards
planeside = -planeside;
if (planeside <= 0) // above view plane
markfloor = false; markfloor = false;
if (frontsector->ceilingplane.PointOnSide(viewx, viewy, viewz) <= 0 &&
frontsector->GetTexture(sector_t::ceiling) != skyflatnum) // below view plane planeside = frontsector->ceilingplane.PointOnSide(viewx, viewy, viewz);
if (frontsector->ceilingplane.c > 0) // 3D floors have the ceiling backwards
planeside = -planeside;
if (planeside <= 0) // below view plane
markceiling = false; markceiling = false;
} }