mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-13 16:07:55 +00:00
- fix a render glitch with Back to Saturn X MAP06: Do not flood missing upper and lower textures with the backsector's flat if that backsector is malformed (i.e. has no area.)
This commit is contained in:
parent
a280c20b4e
commit
fa3a62e954
2 changed files with 13 additions and 4 deletions
|
@ -233,6 +233,7 @@ static void SpreadHackedFlag(subsector_t * sub)
|
||||||
if (!(sub2->hacked&1) && sub2->render_sector == sub->render_sector)
|
if (!(sub2->hacked&1) && sub2->render_sector == sub->render_sector)
|
||||||
{
|
{
|
||||||
sub2->hacked|=1;
|
sub2->hacked|=1;
|
||||||
|
sub->hacked &= ~4;
|
||||||
SpreadHackedFlag (sub2);
|
SpreadHackedFlag (sub2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -285,7 +286,7 @@ static void PrepareSectorData()
|
||||||
subsectors[i].render_sector != seg[j].PartnerSeg->Subsector->render_sector)
|
subsectors[i].render_sector != seg[j].PartnerSeg->Subsector->render_sector)
|
||||||
{
|
{
|
||||||
DPrintf("Found hack: (%d,%d) (%d,%d)\n", seg[j].v1->x>>16, seg[j].v1->y>>16, seg[j].v2->x>>16, seg[j].v2->y>>16);
|
DPrintf("Found hack: (%d,%d) (%d,%d)\n", seg[j].v1->x>>16, seg[j].v1->y>>16, seg[j].v2->x>>16, seg[j].v2->y>>16);
|
||||||
subsectors[i].hacked|=1;
|
subsectors[i].hacked|=5;
|
||||||
SpreadHackedFlag(&subsectors[i]);
|
SpreadHackedFlag(&subsectors[i]);
|
||||||
}
|
}
|
||||||
if (seg[j].PartnerSeg==NULL) subsectors[i].hacked|=2; // used for quick termination checks
|
if (seg[j].PartnerSeg==NULL) subsectors[i].hacked|=2; // used for quick termination checks
|
||||||
|
|
|
@ -1417,7 +1417,7 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector)
|
||||||
sector_t * realback;
|
sector_t * realback;
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
if (seg->linedef-lines==636)
|
if (seg->linedef-lines==1276)
|
||||||
{
|
{
|
||||||
int a = 0;
|
int a = 0;
|
||||||
}
|
}
|
||||||
|
@ -1635,7 +1635,11 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector)
|
||||||
}
|
}
|
||||||
else if (!(seg->sidedef->Flags & WALLF_POLYOBJ))
|
else if (!(seg->sidedef->Flags & WALLF_POLYOBJ))
|
||||||
{
|
{
|
||||||
gl_drawinfo->AddUpperMissingTexture(seg->sidedef, sub, bch1a);
|
// skip processing if the back is a malformed subsector
|
||||||
|
if (!(seg->PartnerSeg->Subsector->hacked & 4))
|
||||||
|
{
|
||||||
|
gl_drawinfo->AddUpperMissingTexture(seg->sidedef, sub, bch1a);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1704,7 +1708,11 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector)
|
||||||
else if (backsector->GetTexture(sector_t::floor) != skyflatnum &&
|
else if (backsector->GetTexture(sector_t::floor) != skyflatnum &&
|
||||||
!(seg->sidedef->Flags & WALLF_POLYOBJ))
|
!(seg->sidedef->Flags & WALLF_POLYOBJ))
|
||||||
{
|
{
|
||||||
gl_drawinfo->AddLowerMissingTexture(seg->sidedef, sub, bfh1);
|
// skip processing if the back is a malformed subsector
|
||||||
|
if (!(seg->PartnerSeg->Subsector->hacked & 4))
|
||||||
|
{
|
||||||
|
gl_drawinfo->AddLowerMissingTexture(seg->sidedef, sub, bfh1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue