From c144eefdad6f799ec59ac3e6d3f5d977c40d9ca2 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Fri, 18 Aug 2017 20:19:17 +0200 Subject: [PATCH] - Draw sloped 3d floors --- src/polyrenderer/scene/poly_plane.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/polyrenderer/scene/poly_plane.cpp b/src/polyrenderer/scene/poly_plane.cpp index 9fd82750c..df2cb6982 100644 --- a/src/polyrenderer/scene/poly_plane.cpp +++ b/src/polyrenderer/scene/poly_plane.cpp @@ -49,7 +49,6 @@ void RenderPolyPlane::Render3DPlanes(const TriMatrix &worldToClip, const PolyCli F3DFloor *fakeFloor = ffloors[i]; if (!(fakeFloor->flags & FF_EXISTS)) continue; if (!fakeFloor->model) continue; - if (fakeFloor->bottom.plane->isSlope()) continue; //if (!(fakeFloor->flags & FF_NOSHADE) || (fakeFloor->flags & (FF_RENDERPLANES | FF_RENDERSIDES))) // R_3D_AddHeight(fakeFloor->top.plane, frontsector); if (!(fakeFloor->flags & FF_RENDERPLANES)) continue; @@ -58,7 +57,7 @@ void RenderPolyPlane::Render3DPlanes(const TriMatrix &worldToClip, const PolyCli //fakeFloor->alpha double fakeHeight = fakeFloor->top.plane->ZatPoint(frontsector->centerspot); - if (fakeHeight < viewpoint.Pos.Z && fakeHeight > frontsector->floorplane.ZatPoint(frontsector->centerspot)) + if (fakeFloor->bottom.plane->isSlope() || (fakeHeight < viewpoint.Pos.Z && fakeHeight > frontsector->floorplane.ZatPoint(frontsector->centerspot))) { RenderPolyPlane plane; plane.Render3DFloor(worldToClip, clipPlane, sub, stencilValue, false, fakeFloor); @@ -71,7 +70,6 @@ void RenderPolyPlane::Render3DPlanes(const TriMatrix &worldToClip, const PolyCli F3DFloor *fakeFloor = ffloors[i]; if (!(fakeFloor->flags & FF_EXISTS)) continue; if (!fakeFloor->model) continue; - if (fakeFloor->top.plane->isSlope()) continue; //if (!(fakeFloor->flags & FF_NOSHADE) || (fakeFloor->flags & (FF_RENDERPLANES | FF_RENDERSIDES))) // R_3D_AddHeight(fakeFloor->bottom.plane, frontsector); if (!(fakeFloor->flags & FF_RENDERPLANES)) continue; @@ -80,7 +78,7 @@ void RenderPolyPlane::Render3DPlanes(const TriMatrix &worldToClip, const PolyCli //fakeFloor->alpha double fakeHeight = fakeFloor->bottom.plane->ZatPoint(frontsector->centerspot); - if (fakeHeight > viewpoint.Pos.Z && fakeHeight < frontsector->ceilingplane.ZatPoint(frontsector->centerspot)) + if (fakeFloor->bottom.plane->isSlope() || (fakeHeight > viewpoint.Pos.Z && fakeHeight < frontsector->ceilingplane.ZatPoint(frontsector->centerspot))) { RenderPolyPlane plane; plane.Render3DFloor(worldToClip, clipPlane, sub, stencilValue, true, fakeFloor);