mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-12 07:34:50 +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
86d9c7ec8e
commit
62880f113b
2 changed files with 13 additions and 4 deletions
|
@ -234,6 +234,7 @@ static void SpreadHackedFlag(subsector_t * sub)
|
|||
if (!(sub2->hacked&1) && sub2->render_sector == sub->render_sector)
|
||||
{
|
||||
sub2->hacked|=1;
|
||||
sub->hacked &= ~4;
|
||||
SpreadHackedFlag (sub2);
|
||||
}
|
||||
}
|
||||
|
@ -286,7 +287,7 @@ static void PrepareSectorData()
|
|||
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);
|
||||
subsectors[i].hacked|=1;
|
||||
subsectors[i].hacked|=5;
|
||||
SpreadHackedFlag(&subsectors[i]);
|
||||
}
|
||||
if (seg[j].PartnerSeg==NULL) subsectors[i].hacked|=2; // used for quick termination checks
|
||||
|
|
|
@ -1441,7 +1441,7 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector)
|
|||
sector_t * realback;
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (seg->linedef-lines==636)
|
||||
if (seg->linedef-lines==1276)
|
||||
{
|
||||
int a = 0;
|
||||
}
|
||||
|
@ -1657,7 +1657,11 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector)
|
|||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1726,7 +1730,11 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector)
|
|||
else if (backsector->GetTexture(sector_t::floor)!=skyflatnum &&
|
||||
!(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