mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 15:22:16 +00:00
- reduced number of references to r_viewpoint in hw_flats
This commit is contained in:
parent
3eb4b137f3
commit
fba5b872be
1 changed files with 7 additions and 6 deletions
|
@ -263,6 +263,7 @@ void GLFlat::ProcessSector(HWDrawInfo *di, sector_t * frontsector)
|
|||
dynlightindex = -1;
|
||||
|
||||
uint8_t &srf = di->sectorrenderflags[sector->sectornum];
|
||||
auto &vp = r_viewpoint;
|
||||
|
||||
//
|
||||
//
|
||||
|
@ -271,7 +272,7 @@ void GLFlat::ProcessSector(HWDrawInfo *di, sector_t * frontsector)
|
|||
//
|
||||
//
|
||||
//
|
||||
if (frontsector->floorplane.ZatPoint(r_viewpoint.Pos) <= r_viewpoint.Pos.Z)
|
||||
if (frontsector->floorplane.ZatPoint(vp.Pos) <= vp.Pos.Z)
|
||||
{
|
||||
// process the original floor first.
|
||||
|
||||
|
@ -331,7 +332,7 @@ void GLFlat::ProcessSector(HWDrawInfo *di, sector_t * frontsector)
|
|||
//
|
||||
//
|
||||
//
|
||||
if (frontsector->ceilingplane.ZatPoint(r_viewpoint.Pos) >= r_viewpoint.Pos.Z)
|
||||
if (frontsector->ceilingplane.ZatPoint(vp.Pos) >= vp.Pos.Z)
|
||||
{
|
||||
// process the original ceiling first.
|
||||
|
||||
|
@ -422,7 +423,7 @@ void GLFlat::ProcessSector(HWDrawInfo *di, sector_t * frontsector)
|
|||
double ff_top = rover->top.plane->ZatPoint(sector->centerspot);
|
||||
if (ff_top < lastceilingheight)
|
||||
{
|
||||
if (r_viewpoint.Pos.Z <= rover->top.plane->ZatPoint(r_viewpoint.Pos))
|
||||
if (vp.Pos.Z <= rover->top.plane->ZatPoint(vp.Pos))
|
||||
{
|
||||
SetFrom3DFloor(rover, true, !!(rover->flags&FF_FOG));
|
||||
Colormap.FadeColor = frontsector->Colormap.FadeColor;
|
||||
|
@ -436,7 +437,7 @@ void GLFlat::ProcessSector(HWDrawInfo *di, sector_t * frontsector)
|
|||
double ff_bottom = rover->bottom.plane->ZatPoint(sector->centerspot);
|
||||
if (ff_bottom < lastceilingheight)
|
||||
{
|
||||
if (r_viewpoint.Pos.Z <= rover->bottom.plane->ZatPoint(r_viewpoint.Pos))
|
||||
if (vp.Pos.Z <= rover->bottom.plane->ZatPoint(vp.Pos))
|
||||
{
|
||||
SetFrom3DFloor(rover, false, !(rover->flags&FF_FOG));
|
||||
Colormap.FadeColor = frontsector->Colormap.FadeColor;
|
||||
|
@ -462,7 +463,7 @@ void GLFlat::ProcessSector(HWDrawInfo *di, sector_t * frontsector)
|
|||
double ff_bottom = rover->bottom.plane->ZatPoint(sector->centerspot);
|
||||
if (ff_bottom > lastfloorheight || (rover->flags&FF_FIX))
|
||||
{
|
||||
if (r_viewpoint.Pos.Z >= rover->bottom.plane->ZatPoint(r_viewpoint.Pos))
|
||||
if (vp.Pos.Z >= rover->bottom.plane->ZatPoint(vp.Pos))
|
||||
{
|
||||
SetFrom3DFloor(rover, false, !(rover->flags&FF_FOG));
|
||||
Colormap.FadeColor = frontsector->Colormap.FadeColor;
|
||||
|
@ -483,7 +484,7 @@ void GLFlat::ProcessSector(HWDrawInfo *di, sector_t * frontsector)
|
|||
double ff_top = rover->top.plane->ZatPoint(sector->centerspot);
|
||||
if (ff_top > lastfloorheight)
|
||||
{
|
||||
if (r_viewpoint.Pos.Z >= rover->top.plane->ZatPoint(r_viewpoint.Pos))
|
||||
if (vp.Pos.Z >= rover->top.plane->ZatPoint(vp.Pos))
|
||||
{
|
||||
SetFrom3DFloor(rover, true, !!(rover->flags&FF_FOG));
|
||||
Colormap.FadeColor = frontsector->Colormap.FadeColor;
|
||||
|
|
Loading…
Reference in a new issue