- Fix HOM for Line_Horizon specials when used with a skybox

This commit is contained in:
Magnus Norddahl 2017-08-19 14:32:34 +02:00
parent 45d5eac6ad
commit 2f5535dbca

View file

@ -30,6 +30,7 @@
#include "polyrenderer/poly_renderer.h" #include "polyrenderer/poly_renderer.h"
#include "r_sky.h" #include "r_sky.h"
#include "polyrenderer/scene/poly_light.h" #include "polyrenderer/scene/poly_light.h"
#include "p_lnspec.h"
EXTERN_CVAR(Int, r_3dfloors) EXTERN_CVAR(Int, r_3dfloors)
@ -388,6 +389,12 @@ void RenderPolyPlane::Render(const TriMatrix &worldToClip, const PolyClipPlane &
continue; 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) if (ceiling)
{ {