mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-22 11:21:09 +00:00
Attempt to optimize check for ML_DRAWFULLHEIGHT
It is less likely that a line will have the ML_DRAWFULLHEIGHT flag than its' ceiling will be above the neighbouring sector's ceiling and vice versa.
This commit is contained in:
parent
c75ec6f59f
commit
db66f78c16
1 changed files with 6 additions and 12 deletions
|
@ -1624,15 +1624,12 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector,
|
||||||
if (frontsector->GetTexture(sector_t::floor) != skyflatnum || backsector->GetTexture(sector_t::floor) != skyflatnum)
|
if (frontsector->GetTexture(sector_t::floor) != skyflatnum || backsector->GetTexture(sector_t::floor) != skyflatnum)
|
||||||
{
|
{
|
||||||
// the back sector's floor obstructs part of this wall
|
// the back sector's floor obstructs part of this wall
|
||||||
if ((seg->linedef->flags & ML_DRAWFULLHEIGHT) == 0)
|
if (ffh1 > bch1 && ffh2 > bch2 && (seg->linedef->flags & ML_DRAWFULLHEIGHT) == 0)
|
||||||
{
|
|
||||||
if (ffh1 > bch1 && ffh2 > bch2)
|
|
||||||
{
|
{
|
||||||
bch2a = ffh2;
|
bch2a = ffh2;
|
||||||
bch1a = ffh1;
|
bch1a = ffh1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (bch1a < fch1 || bch2a < fch2)
|
if (bch1a < fch1 || bch2a < fch2)
|
||||||
{
|
{
|
||||||
|
@ -1708,14 +1705,11 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector,
|
||||||
|
|
||||||
/* bottom texture */
|
/* bottom texture */
|
||||||
// the back sector's ceiling obstructs part of this wall (specially important for sky sectors)
|
// the back sector's ceiling obstructs part of this wall (specially important for sky sectors)
|
||||||
if ((seg->linedef->flags & ML_DRAWFULLHEIGHT) == 0)
|
if (fch1 < bfh1 && fch2 < bfh2 && (seg->linedef->flags & ML_DRAWFULLHEIGHT) == 0)
|
||||||
{
|
|
||||||
if (fch1 < bfh1 && fch2 < bfh2)
|
|
||||||
{
|
{
|
||||||
bfh1 = fch1;
|
bfh1 = fch1;
|
||||||
bfh2 = fch2;
|
bfh2 = fch2;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (bfh1 > ffh1 || bfh2 > ffh2)
|
if (bfh1 > ffh1 || bfh2 > ffh2)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue