Skip to content
Permalink
Browse files

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.
  • Loading branch information
Talon1024 authored and coelckers committed Jan 11, 2020
1 parent d73a5f5 commit 91589d9799d38db7413b57126748cba7253fcf9a
Showing with 6 additions and 12 deletions.
  1. +6 −12 src/rendering/hwrenderer/scene/hw_walls.cpp
@@ -2024,13 +2024,10 @@ void HWWall::Process(HWDrawInfo *di, seg_t *seg, sector_t * frontsector, sector_
if (frontsector->GetTexture(sector_t::floor) != skyflatnum || backsector->GetTexture(sector_t::floor) != skyflatnum)
{
// 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;
bch1a = ffh1;
}
bch2a = ffh2;
bch1a = ffh1;
}
}

@@ -2108,13 +2105,10 @@ void HWWall::Process(HWDrawInfo *di, seg_t *seg, sector_t * frontsector, sector_

/* bottom texture */
// 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;
bfh2 = fch2;
}
bfh1 = fch1;
bfh2 = fch2;
}

if (bfh1 > ffh1 || bfh2 > ffh2)

0 comments on commit 91589d9

Please sign in to comment.
You can’t perform that action at this time.