From 6921a3edc2dd0f35a498a7f6944c41c2f6f5b4eb Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 23 Apr 2013 03:51:51 +0000 Subject: [PATCH] - Fixed: r4220 broke 3D floor rendering, because 3D floors have the floor and ceiling orientations reversed compared to normal conventions. SVN r4225 (trunk) --- src/r_segs.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/r_segs.cpp b/src/r_segs.cpp index c4dca60f6..9d9f197db 100644 --- a/src/r_segs.cpp +++ b/src/r_segs.cpp @@ -2242,10 +2242,18 @@ void R_NewWall (bool needlights) // killough 3/7/98: add deep water check 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; - 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; }