mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-03 01:13:22 +00:00
- fixed retrieval of mapsection for polyportals.
- render wall portals on one sided lines.
This commit is contained in:
parent
3683a8ac58
commit
7105a87a1e
3 changed files with 23 additions and 12 deletions
|
@ -1050,7 +1050,12 @@ void GLLineToLinePortal::DrawContents()
|
||||||
|
|
||||||
for (unsigned i = 0; i < lines.Size(); i++)
|
for (unsigned i = 0; i < lines.Size(); i++)
|
||||||
{
|
{
|
||||||
int mapsection = lines[i].seg->linedef->getPortalDestination()->frontsector->subsectors[0]->mapsection;
|
line_t *line = lines[i].seg->linedef->getPortalDestination();
|
||||||
|
subsector_t *sub;
|
||||||
|
if (line->sidedef[0]->Flags & WALLF_POLYOBJ)
|
||||||
|
sub = R_PointInSubsector(line->v1->x, line->v1->y);
|
||||||
|
else sub = line->frontsector->subsectors[0];
|
||||||
|
int mapsection = sub->mapsection;
|
||||||
currentmapsection[mapsection >> 3] |= 1 << (mapsection & 7);
|
currentmapsection[mapsection >> 3] |= 1 << (mapsection & 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -193,19 +193,12 @@ void GLWall::SkyLine(sector_t *fs, line_t *line)
|
||||||
{
|
{
|
||||||
ASkyViewpoint * skyboxx = line->skybox;
|
ASkyViewpoint * skyboxx = line->skybox;
|
||||||
GLSkyInfo skyinfo;
|
GLSkyInfo skyinfo;
|
||||||
GLLineToLineInfo llinfo;
|
|
||||||
int ptype;
|
int ptype;
|
||||||
|
|
||||||
// JUSTHIT is used as an indicator that a skybox is in use.
|
// JUSTHIT is used as an indicator that a skybox is in use.
|
||||||
// This is to avoid recursion
|
// This is to avoid recursion
|
||||||
|
|
||||||
if (line->isVisualPortal())
|
if (!gl_noskyboxes && skyboxx && GLRenderer->mViewActor != skyboxx && !(skyboxx->flags&MF_JUSTHIT))
|
||||||
{
|
|
||||||
ptype = PORTALTYPE_LINETOLINE;
|
|
||||||
llinfo.init(line);
|
|
||||||
l2l = UniqueLineToLines.Get(&llinfo);
|
|
||||||
}
|
|
||||||
else if (!gl_noskyboxes && skyboxx && GLRenderer->mViewActor != skyboxx && !(skyboxx->flags&MF_JUSTHIT))
|
|
||||||
{
|
{
|
||||||
ptype = PORTALTYPE_SKYBOX;
|
ptype = PORTALTYPE_SKYBOX;
|
||||||
skybox = skyboxx;
|
skybox = skyboxx;
|
||||||
|
|
|
@ -1475,7 +1475,18 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector)
|
||||||
// sector's sky
|
// sector's sky
|
||||||
SkyNormal(frontsector, v1, v2);
|
SkyNormal(frontsector, v1, v2);
|
||||||
|
|
||||||
if (seg->linedef->skybox == NULL)
|
if (seg->linedef->isVisualPortal())
|
||||||
|
{
|
||||||
|
GLLineToLineInfo llinfo;
|
||||||
|
ztop[0] = zceil[0];
|
||||||
|
ztop[1] = zceil[1];
|
||||||
|
zbottom[0] = zfloor[0];
|
||||||
|
zbottom[1] = zfloor[1];
|
||||||
|
llinfo.init(seg->linedef);
|
||||||
|
l2l = UniqueLineToLines.Get(&llinfo);
|
||||||
|
PutPortal(PORTALTYPE_LINETOLINE);
|
||||||
|
}
|
||||||
|
else if (seg->linedef->skybox == NULL && !seg->linedef->isVisualPortal())
|
||||||
{
|
{
|
||||||
// normal texture
|
// normal texture
|
||||||
gltexture = FMaterial::ValidateTexture(seg->sidedef->GetTexture(side_t::mid), false, true);
|
gltexture = FMaterial::ValidateTexture(seg->sidedef->GetTexture(side_t::mid), false, true);
|
||||||
|
@ -1590,12 +1601,14 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector)
|
||||||
|
|
||||||
if (seg->linedef->isVisualPortal() && seg->sidedef == seg->linedef->sidedef[0])
|
if (seg->linedef->isVisualPortal() && seg->sidedef == seg->linedef->sidedef[0])
|
||||||
{
|
{
|
||||||
|
GLLineToLineInfo llinfo;
|
||||||
ztop[0] = FIXED2FLOAT(bch1);
|
ztop[0] = FIXED2FLOAT(bch1);
|
||||||
ztop[1] = FIXED2FLOAT(bch2);
|
ztop[1] = FIXED2FLOAT(bch2);
|
||||||
zbottom[0] = FIXED2FLOAT(bfh1);
|
zbottom[0] = FIXED2FLOAT(bfh1);
|
||||||
zbottom[1] = FIXED2FLOAT(bfh2);
|
zbottom[1] = FIXED2FLOAT(bfh2);
|
||||||
|
llinfo.init(seg->linedef);
|
||||||
SkyLine(frontsector, seg->linedef);
|
l2l = UniqueLineToLines.Get(&llinfo);
|
||||||
|
PutPortal(PORTALTYPE_LINETOLINE);
|
||||||
}
|
}
|
||||||
else if (backsector->e->XFloor.ffloors.Size() || frontsector->e->XFloor.ffloors.Size())
|
else if (backsector->e->XFloor.ffloors.Size() || frontsector->e->XFloor.ffloors.Size())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue