- fixed skybox picking in GL renderer.

This commit is contained in:
Christoph Oelckers 2015-11-25 11:57:53 +01:00
parent 4ed78d78cc
commit b00b49c111

View file

@ -80,8 +80,7 @@ void GLWall::SkyPlane(sector_t *sector, int plane, bool allowreflect)
else if (sector->GetTexture(plane)==skyflatnum) else if (sector->GetTexture(plane)==skyflatnum)
{ {
GLSkyInfo skyinfo; GLSkyInfo skyinfo;
ASkyViewpoint * skyboxx = plane == sector_t::floor? sector->FloorSkyBox : sector->CeilingSkyBox; ASkyViewpoint * skyboxx = sector->GetSkyBox(plane);
if (skyboxx == NULL) skyboxx = level.DefaultSkybox;
// JUSTHIT is used as an indicator that a skybox is in use. // JUSTHIT is used as an indicator that a skybox is in use.
// This is to avoid recursion // This is to avoid recursion