- fixed: Normal skyboxes should not block spawning of a portal.

SVN r3014 (trunk)
This commit is contained in:
Christoph Oelckers 2010-11-30 09:36:36 +00:00
parent 5ad9e0c3b8
commit ce8be35000

View file

@ -867,7 +867,7 @@ static void SetupFloorPortal (AStackPoint *point)
NActorIterator it (NAME_LowerStackLookOnly, point->tid); NActorIterator it (NAME_LowerStackLookOnly, point->tid);
sector_t *Sector = point->Sector; sector_t *Sector = point->Sector;
Sector->FloorSkyBox = static_cast<ASkyViewpoint*>(it.Next()); Sector->FloorSkyBox = static_cast<ASkyViewpoint*>(it.Next());
if (Sector->FloorSkyBox != NULL) if (Sector->FloorSkyBox != NULL || !Sector->FloorSkyBox->bAlways)
{ {
Sector->FloorSkyBox->Mate = point; Sector->FloorSkyBox->Mate = point;
if (Sector->GetAlpha(sector_t::floor) == OPAQUE) if (Sector->GetAlpha(sector_t::floor) == OPAQUE)
@ -880,7 +880,7 @@ static void SetupCeilingPortal (AStackPoint *point)
NActorIterator it (NAME_UpperStackLookOnly, point->tid); NActorIterator it (NAME_UpperStackLookOnly, point->tid);
sector_t *Sector = point->Sector; sector_t *Sector = point->Sector;
Sector->CeilingSkyBox = static_cast<ASkyViewpoint*>(it.Next()); Sector->CeilingSkyBox = static_cast<ASkyViewpoint*>(it.Next());
if (Sector->CeilingSkyBox != NULL) if (Sector->CeilingSkyBox != NULL || !Sector->CeilingSkyBox->bAlways)
{ {
Sector->CeilingSkyBox->Mate = point; Sector->CeilingSkyBox->Mate = point;
if (Sector->GetAlpha(sector_t::ceiling) == OPAQUE) 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 // plane: 0=floor, 1=ceiling, 2=both
if (plane > 0) if (plane > 0)
{ {
if (sector->CeilingSkyBox == NULL) if (sector->CeilingSkyBox == NULL || !sector->CeilingSkyBox->bAlways)
{ {
sector->CeilingSkyBox = portal; sector->CeilingSkyBox = portal;
if (sector->GetAlpha(sector_t::ceiling) == OPAQUE) 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 (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) if (sector->GetAlpha(sector_t::floor) == OPAQUE)
sector->SetAlpha(sector_t::floor, alpha); sector->SetAlpha(sector_t::floor, alpha);
} }