mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 16:41:09 +00:00
- copied over some stuff from the abandoned portals branch.
This commit is contained in:
parent
b60069bb26
commit
9608252873
4 changed files with 33 additions and 13 deletions
|
@ -212,6 +212,8 @@ sector_t * gl_FakeFlat(sector_t * sec, sector_t * dest, area_t in_area, bool bac
|
|||
dest->ceilingplane=sec->floorplane;
|
||||
dest->ceilingplane.FlipVert();
|
||||
dest->planes[sector_t::ceiling].TexZ = dest->planes[sector_t::floor].TexZ;
|
||||
dest->portals[sector_t::ceiling] = NULL;
|
||||
dest->portals[sector_t::floor] = NULL;
|
||||
return dest;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -524,11 +524,18 @@ void GLFlat::ProcessSector(sector_t * frontsector)
|
|||
lightlevel = gl_ClampLight(frontsector->GetFloorLight());
|
||||
Colormap=frontsector->ColorMap;
|
||||
if ((stack = (frontsector->portals[sector_t::floor] != NULL)))
|
||||
{
|
||||
if (!frontsector->PortalBlocksView(sector_t::floor))
|
||||
{
|
||||
gl_drawinfo->AddFloorStack(sector);
|
||||
alpha = frontsector->GetAlpha(sector_t::floor) / 65536.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
alpha = 1.f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
alpha = 1.0f-frontsector->GetReflect(sector_t::floor);
|
||||
}
|
||||
|
@ -575,11 +582,18 @@ void GLFlat::ProcessSector(sector_t * frontsector)
|
|||
lightlevel = gl_ClampLight(frontsector->GetCeilingLight());
|
||||
Colormap=frontsector->ColorMap;
|
||||
if ((stack = (frontsector->portals[sector_t::ceiling] != NULL)))
|
||||
{
|
||||
if (!frontsector->PortalBlocksView(sector_t::ceiling))
|
||||
{
|
||||
gl_drawinfo->AddCeilingStack(sector);
|
||||
alpha = frontsector->GetAlpha(sector_t::ceiling) / 65536.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
alpha = 1.f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
alpha = 1.0f-frontsector->GetReflect(sector_t::ceiling);
|
||||
}
|
||||
|
|
|
@ -142,6 +142,8 @@ void GLWall::SkyPlane(sector_t *sector, int plane, bool allowreflect)
|
|||
FPortal *portal = sector->portals[plane];
|
||||
if (portal != NULL)
|
||||
{
|
||||
if (sector->PortalBlocksView(plane)) return;
|
||||
|
||||
if (GLPortal::instack[1 - plane]) return;
|
||||
ptype = PORTALTYPE_SECTORSTACK;
|
||||
this->portal = portal;
|
||||
|
@ -302,8 +304,6 @@ void GLWall::SkyTop(seg_t * seg,sector_t * fs,sector_t * bs,vertex_t * v1,vertex
|
|||
}
|
||||
else
|
||||
{
|
||||
FPortal *pfront = fs->portals[sector_t::ceiling];
|
||||
FPortal *pback = bs->portals[sector_t::ceiling];
|
||||
float frontreflect = fs->GetReflect(sector_t::ceiling);
|
||||
if (frontreflect > 0)
|
||||
{
|
||||
|
@ -314,9 +314,12 @@ void GLWall::SkyTop(seg_t * seg,sector_t * fs,sector_t * bs,vertex_t * v1,vertex
|
|||
return;
|
||||
}
|
||||
}
|
||||
else if (pfront == NULL || pfront == pback)
|
||||
else
|
||||
{
|
||||
return;
|
||||
FPortal *pfront = fs->portals[sector_t::ceiling];
|
||||
FPortal *pback = bs->portals[sector_t::ceiling];
|
||||
if (pfront == NULL || fs->PortalBlocksView(sector_t::ceiling)) return;
|
||||
if (pfront == pback && !bs->PortalBlocksView(sector_t::ceiling)) return;
|
||||
}
|
||||
|
||||
// stacked sectors
|
||||
|
@ -378,8 +381,6 @@ void GLWall::SkyBottom(seg_t * seg,sector_t * fs,sector_t * bs,vertex_t * v1,ver
|
|||
}
|
||||
else
|
||||
{
|
||||
FPortal *pfront = fs->portals[sector_t::floor];
|
||||
FPortal *pback = bs->portals[sector_t::floor];
|
||||
float frontreflect = fs->GetReflect(sector_t::floor);
|
||||
if (frontreflect > 0)
|
||||
{
|
||||
|
@ -390,9 +391,12 @@ void GLWall::SkyBottom(seg_t * seg,sector_t * fs,sector_t * bs,vertex_t * v1,ver
|
|||
return;
|
||||
}
|
||||
}
|
||||
else if (pfront == NULL || pfront == pback)
|
||||
else
|
||||
{
|
||||
return;
|
||||
FPortal *pfront = fs->portals[sector_t::floor];
|
||||
FPortal *pback = bs->portals[sector_t::floor];
|
||||
if (pfront == NULL || fs->PortalBlocksView(sector_t::floor)) return;
|
||||
if (pfront == pback && !bs->PortalBlocksView(sector_t::floor)) return;
|
||||
}
|
||||
|
||||
// stacked sectors
|
||||
|
|
|
@ -175,7 +175,7 @@ void GLWall::PutPortal(int ptype)
|
|||
portal = GLPortal::FindPortal(skybox);
|
||||
if (!portal)
|
||||
{
|
||||
// either a regulat skybox or an Eternity-style horizon
|
||||
// either a regular skybox or an Eternity-style horizon
|
||||
if (skybox->special1 != SKYBOX_MAP) portal = new GLEEHorizonPortal(skybox);
|
||||
else portal = new GLSkyboxPortal(skybox);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue