From f4ab6074faf10624e76bad222cfe749d5c7bcbaf Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 25 Nov 2015 13:30:12 +0100 Subject: [PATCH] - today's 'GCC sucks' fix. (Yet again some overtly anal type issues with the '? :' operator...) --- src/p_sectors.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/p_sectors.cpp b/src/p_sectors.cpp index bc7abd380..361b220a7 100644 --- a/src/p_sectors.cpp +++ b/src/p_sectors.cpp @@ -806,12 +806,15 @@ ASkyViewpoint *sector_t::GetSkyBox(int which) { if (which == floor) { - return FloorSkyBox != NULL ? FloorSkyBox : (MoreFlags & SECF_NOFLOORSKYBOX)? (ASkyViewpoint*)NULL : level.DefaultSkybox; + if (FloorSkyBox != NULL) return FloorSkyBox; + if (MoreFlags & SECF_NOFLOORSKYBOX) return NULL; } else { - return CeilingSkyBox != NULL ? CeilingSkyBox : (MoreFlags & SECF_NOCEILINGSKYBOX)? (ASkyViewpoint*)NULL : level.DefaultSkybox; + if (CeilingSkyBox != NULL) return CeilingSkyBox; + if (MoreFlags & SECF_NOCEILINGSKYBOX) return NULL; } + return level.DefaultSkybox; }