diff --git a/src/r_plane.cpp b/src/r_plane.cpp index fe0b7ec2b..f4eb61410 100644 --- a/src/r_plane.cpp +++ b/src/r_plane.cpp @@ -746,6 +746,13 @@ void R_DrawSkyPlanes(void) visplane_t *pl; INT32 i; + // If we're not supposed to draw the sky (e.g. for skyboxes), don't do anything! + // This probably utterly ruins sky rendering for FOFs and polyobjects, unfortunately + if (!newview->sky) + { + return; + } + #ifdef HAVE_THREADS srb2::ThreadPool::Sema tp_sema; srb2::g_main_threadpool->begin_sema(); @@ -774,13 +781,6 @@ static void R_DrawSkyPlane(visplane_t *pl, void(*colfunc2)(drawcolumndata_t*), b if (!(pl->minx <= pl->maxx)) return; - // If we're not supposed to draw the sky (e.g. for skyboxes), don't do anything! - // This probably utterly ruins sky rendering for FOFs and polyobjects, unfortunately - if (!newview->sky) - { - return; - } - drawcolumndata_t dc = {}; const INT32 texture = texturetranslation[skytexture];