- fixed: Portal setup did some incorrect validity checks.

SVN r3025 (trunk)
This commit is contained in:
Christoph Oelckers 2010-12-09 07:55:46 +00:00
parent 092f53d875
commit c9a33edee0

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 || !Sector->FloorSkyBox->bAlways) 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 || !Sector->CeilingSkyBox->bAlways) 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)