From 2f5535dbca9b0198170a5804fc02d8208156a6c9 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sat, 19 Aug 2017 14:32:34 +0200 Subject: [PATCH] - Fix HOM for Line_Horizon specials when used with a skybox --- src/polyrenderer/scene/poly_plane.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/polyrenderer/scene/poly_plane.cpp b/src/polyrenderer/scene/poly_plane.cpp index df2cb6982..288cb6f4b 100644 --- a/src/polyrenderer/scene/poly_plane.cpp +++ b/src/polyrenderer/scene/poly_plane.cpp @@ -30,6 +30,7 @@ #include "polyrenderer/poly_renderer.h" #include "r_sky.h" #include "polyrenderer/scene/poly_light.h" +#include "p_lnspec.h" EXTERN_CVAR(Int, r_3dfloors) @@ -388,6 +389,12 @@ void RenderPolyPlane::Render(const TriMatrix &worldToClip, const PolyClipPlane & continue; } } + else if (portal && line->linedef && line->linedef->special == Line_Horizon) + { + // Not entirely correct as this closes the line horizon rather than allowing the floor to continue to infinity + skyBottomz1 = frontsector->floorplane.ZatPoint(line->v1); + skyBottomz2 = frontsector->floorplane.ZatPoint(line->v2); + } if (ceiling) {