From ce8be35000f23e150d16ec4d7640092b21d40e22 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 30 Nov 2010 09:36:36 +0000 Subject: [PATCH] - fixed: Normal skyboxes should not block spawning of a portal. SVN r3014 (trunk) --- src/p_spec.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/p_spec.cpp b/src/p_spec.cpp index bdd6820f4..eeb58d0c3 100644 --- a/src/p_spec.cpp +++ b/src/p_spec.cpp @@ -867,7 +867,7 @@ static void SetupFloorPortal (AStackPoint *point) NActorIterator it (NAME_LowerStackLookOnly, point->tid); sector_t *Sector = point->Sector; Sector->FloorSkyBox = static_cast(it.Next()); - if (Sector->FloorSkyBox != NULL) + if (Sector->FloorSkyBox != NULL || !Sector->FloorSkyBox->bAlways) { Sector->FloorSkyBox->Mate = point; if (Sector->GetAlpha(sector_t::floor) == OPAQUE) @@ -880,7 +880,7 @@ static void SetupCeilingPortal (AStackPoint *point) NActorIterator it (NAME_UpperStackLookOnly, point->tid); sector_t *Sector = point->Sector; Sector->CeilingSkyBox = static_cast(it.Next()); - if (Sector->CeilingSkyBox != NULL) + if (Sector->CeilingSkyBox != NULL || !Sector->CeilingSkyBox->bAlways) { Sector->CeilingSkyBox->Mate = point; if (Sector->GetAlpha(sector_t::ceiling) == OPAQUE) @@ -1023,7 +1023,7 @@ inline void SetPortal(sector_t *sector, int plane, AStackPoint *portal, fixed_t // plane: 0=floor, 1=ceiling, 2=both if (plane > 0) { - if (sector->CeilingSkyBox == NULL) + if (sector->CeilingSkyBox == NULL || !sector->CeilingSkyBox->bAlways) { sector->CeilingSkyBox = portal; if (sector->GetAlpha(sector_t::ceiling) == OPAQUE) @@ -1032,7 +1032,10 @@ inline void SetPortal(sector_t *sector, int plane, AStackPoint *portal, fixed_t } if (plane == 2 || plane == 0) { - if (sector->FloorSkyBox == NULL) sector->FloorSkyBox = portal; + if (sector->FloorSkyBox == NULL || !sector->FloorSkyBox->bAlways) + { + sector->FloorSkyBox = portal; + } if (sector->GetAlpha(sector_t::floor) == OPAQUE) sector->SetAlpha(sector_t::floor, alpha); }