mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-07 09:01:57 +00:00
- fixed CollectPortalSectors
This commit is contained in:
parent
7c925e39fe
commit
cd778b6bdc
1 changed files with 9 additions and 16 deletions
|
@ -354,24 +354,17 @@ static void CollectPortalSectors(FPortalMap &collection)
|
||||||
for (int i=0;i<numsectors;i++)
|
for (int i=0;i<numsectors;i++)
|
||||||
{
|
{
|
||||||
sector_t *sec = §ors[i];
|
sector_t *sec = §ors[i];
|
||||||
if (sec->CeilingSkyBox != NULL && sec->CeilingSkyBox->bAlways && sec->CeilingSkyBox->Mate != NULL)
|
for (int j = 0; j < 2; j++)
|
||||||
{
|
{
|
||||||
FPortalID id = { sec->CeilingSkyBox->x - sec->CeilingSkyBox->Mate->x,
|
ASkyViewpoint *SkyBox = sec->SkyBoxes[j];
|
||||||
sec->CeilingSkyBox->y - sec->CeilingSkyBox->Mate->y};
|
if (SkyBox != NULL && SkyBox->bAlways && SkyBox->Mate != NULL)
|
||||||
|
{
|
||||||
|
FPortalID id = { SkyBox->x - SkyBox->Mate->x, SkyBox->y - SkyBox->Mate->y };
|
||||||
|
|
||||||
FPortalSectors &sss = collection[id];
|
FPortalSectors &sss = collection[id];
|
||||||
FPortalSector ss = { sec, sector_t::ceiling };
|
FPortalSector ss = { sec, j };
|
||||||
sss.Push(ss);
|
sss.Push(ss);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sec->FloorSkyBox != NULL && sec->FloorSkyBox->bAlways && sec->FloorSkyBox->Mate != NULL)
|
|
||||||
{
|
|
||||||
FPortalID id = { sec->FloorSkyBox->x - sec->FloorSkyBox->Mate->x,
|
|
||||||
sec->FloorSkyBox->y - sec->FloorSkyBox->Mate->y };
|
|
||||||
|
|
||||||
FPortalSectors &sss = collection[id];
|
|
||||||
FPortalSector ss = { sec, sector_t::floor };
|
|
||||||
sss.Push(ss);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue