From be3b126f7b9a3e20d68a0ff9825a7424536a9ea0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 3 May 2016 19:42:53 +0200 Subject: [PATCH] - fixed: Order of skybox and portal initialization was not well defined. It was always the last item to get initialized that got set. Changed it so that skyboxes cannot override portals at all. --- src/g_shared/a_skies.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/g_shared/a_skies.cpp b/src/g_shared/a_skies.cpp index 4e57c638e7..57fce23fd0 100644 --- a/src/g_shared/a_skies.cpp +++ b/src/g_shared/a_skies.cpp @@ -126,13 +126,16 @@ void ASkyPicker::PostBeginPlay () else { int boxindex = P_GetSkyboxPortal(box); + // Do not override special portal types, only regular skies. if (0 == (args[1] & 2)) { - Sector->Portals[sector_t::ceiling] = boxindex; + if (Sector->GetPortalType(sector_t::ceiling) == PORTS_SKYVIEWPOINT) + Sector->Portals[sector_t::ceiling] = boxindex; } if (0 == (args[1] & 1)) { - Sector->Portals[sector_t::floor] = boxindex; + if (Sector->GetPortalType(sector_t::floor) == PORTS_SKYVIEWPOINT) + Sector->Portals[sector_t::floor] = boxindex; } } Destroy ();