mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-14 16:40:56 +00:00
- small optimization
This commit is contained in:
parent
fba5b872be
commit
12ad0caec0
1 changed files with 3 additions and 2 deletions
|
@ -154,8 +154,9 @@ void GLWall::SkyPlane(HWDrawInfo *di, sector_t *sector, int plane, bool allowref
|
||||||
}
|
}
|
||||||
else if (allowreflect && sector->GetReflect(plane) > 0)
|
else if (allowreflect && sector->GetReflect(plane) > 0)
|
||||||
{
|
{
|
||||||
if ((plane == sector_t::ceiling && r_viewpoint.Pos.Z > sector->ceilingplane.fD()) ||
|
auto vpz = r_viewpoint.Pos.Z;
|
||||||
(plane == sector_t::floor && r_viewpoint.Pos.Z < -sector->floorplane.fD())) return;
|
if ((plane == sector_t::ceiling && vpz > sector->ceilingplane.fD()) ||
|
||||||
|
(plane == sector_t::floor && vpz < -sector->floorplane.fD())) return;
|
||||||
ptype = PORTALTYPE_PLANEMIRROR;
|
ptype = PORTALTYPE_PLANEMIRROR;
|
||||||
planemirror = plane == sector_t::ceiling ? §or->ceilingplane : §or->floorplane;
|
planemirror = plane == sector_t::ceiling ? §or->ceilingplane : §or->floorplane;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue