From b00b49c111bb537ed14c26e83646615f9fc98627 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 25 Nov 2015 11:57:53 +0100 Subject: [PATCH] - fixed skybox picking in GL renderer. --- src/gl/scene/gl_sky.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gl/scene/gl_sky.cpp b/src/gl/scene/gl_sky.cpp index d208e6875..38dbfca49 100644 --- a/src/gl/scene/gl_sky.cpp +++ b/src/gl/scene/gl_sky.cpp @@ -80,8 +80,7 @@ void GLWall::SkyPlane(sector_t *sector, int plane, bool allowreflect) else if (sector->GetTexture(plane)==skyflatnum) { GLSkyInfo skyinfo; - ASkyViewpoint * skyboxx = plane == sector_t::floor? sector->FloorSkyBox : sector->CeilingSkyBox; - if (skyboxx == NULL) skyboxx = level.DefaultSkybox; + ASkyViewpoint * skyboxx = sector->GetSkyBox(plane); // JUSTHIT is used as an indicator that a skybox is in use. // This is to avoid recursion