mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- another small optimization
This commit is contained in:
parent
12ad0caec0
commit
ae7053ee98
1 changed files with 5 additions and 4 deletions
|
@ -444,10 +444,11 @@ bool GLWall::DoHorizon(HWDrawInfo *di, seg_t * seg,sector_t * fs, vertex_t * v1,
|
||||||
ztop[1] = ztop[0] = fs->GetPlaneTexZ(sector_t::ceiling);
|
ztop[1] = ztop[0] = fs->GetPlaneTexZ(sector_t::ceiling);
|
||||||
zbottom[1] = zbottom[0] = fs->GetPlaneTexZ(sector_t::floor);
|
zbottom[1] = zbottom[0] = fs->GetPlaneTexZ(sector_t::floor);
|
||||||
|
|
||||||
if (r_viewpoint.Pos.Z < fs->GetPlaneTexZ(sector_t::ceiling))
|
auto vpz = r_viewpoint.Pos.Z;
|
||||||
|
if (vpz < fs->GetPlaneTexZ(sector_t::ceiling))
|
||||||
{
|
{
|
||||||
if (r_viewpoint.Pos.Z > fs->GetPlaneTexZ(sector_t::floor))
|
if (vpz > fs->GetPlaneTexZ(sector_t::floor))
|
||||||
zbottom[1] = zbottom[0] = r_viewpoint.Pos.Z;
|
zbottom[1] = zbottom[0] = vpz;
|
||||||
|
|
||||||
if (fs->GetTexture(sector_t::ceiling) == skyflatnum)
|
if (fs->GetTexture(sector_t::ceiling) == skyflatnum)
|
||||||
{
|
{
|
||||||
|
@ -475,7 +476,7 @@ bool GLWall::DoHorizon(HWDrawInfo *di, seg_t * seg,sector_t * fs, vertex_t * v1,
|
||||||
ztop[1] = ztop[0] = zbottom[0];
|
ztop[1] = ztop[0] = zbottom[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r_viewpoint.Pos.Z > fs->GetPlaneTexZ(sector_t::floor))
|
if (vpz > fs->GetPlaneTexZ(sector_t::floor))
|
||||||
{
|
{
|
||||||
zbottom[1] = zbottom[0] = fs->GetPlaneTexZ(sector_t::floor);
|
zbottom[1] = zbottom[0] = fs->GetPlaneTexZ(sector_t::floor);
|
||||||
if (fs->GetTexture(sector_t::floor) == skyflatnum)
|
if (fs->GetTexture(sector_t::floor) == skyflatnum)
|
||||||
|
|
Loading…
Reference in a new issue