mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-28 22:52:45 +00:00
- fixed: The 3D-floor plane renderer mixed float and fixed point.
This commit is contained in:
parent
4af859094c
commit
485a1bd0a5
1 changed files with 55 additions and 55 deletions
|
@ -631,8 +631,8 @@ void GLFlat::ProcessSector(sector_t * frontsector)
|
|||
renderflags = SSRF_RENDER3DPLANES;
|
||||
srf |= SSRF_RENDER3DPLANES;
|
||||
// 3d-floors must not overlap!
|
||||
fixed_t lastceilingheight=sector->CenterCeiling(); // render only in the range of the
|
||||
fixed_t lastfloorheight=sector->CenterFloor(); // current sector part (if applicable)
|
||||
double lastceilingheight = sector->CenterCeiling(); // render only in the range of the
|
||||
double lastfloorheight = sector->CenterFloor(); // current sector part (if applicable)
|
||||
F3DFloor * rover;
|
||||
int k;
|
||||
|
||||
|
@ -649,7 +649,7 @@ void GLFlat::ProcessSector(sector_t * frontsector)
|
|||
if (rover->flags&FF_FOG && gl_fixedcolormap) continue;
|
||||
if (!rover->top.copied && rover->flags&(FF_INVERTPLANES | FF_BOTHPLANES))
|
||||
{
|
||||
fixed_t ff_top=FLOAT2FIXED(rover->top.plane->ZatPoint(sector->centerspot));
|
||||
double ff_top = rover->top.plane->ZatPoint(sector->centerspot);
|
||||
if (ff_top < lastceilingheight)
|
||||
{
|
||||
if (ViewPos.Z <= rover->top.plane->ZatPoint(ViewPos))
|
||||
|
@ -663,7 +663,7 @@ void GLFlat::ProcessSector(sector_t * frontsector)
|
|||
}
|
||||
if (!rover->bottom.copied && !(rover->flags&FF_INVERTPLANES))
|
||||
{
|
||||
fixed_t ff_bottom=FLOAT2FIXED(rover->bottom.plane->ZatPoint(sector->centerspot));
|
||||
double ff_bottom = rover->bottom.plane->ZatPoint(sector->centerspot);
|
||||
if (ff_bottom < lastceilingheight)
|
||||
{
|
||||
if (ViewPos.Z <= rover->bottom.plane->ZatPoint(ViewPos))
|
||||
|
@ -673,7 +673,7 @@ void GLFlat::ProcessSector(sector_t * frontsector)
|
|||
Process(rover->bottom.model, rover->bottom.isceiling, !!(rover->flags&FF_FOG));
|
||||
}
|
||||
lastceilingheight = ff_bottom;
|
||||
if (rover->alpha<255) lastceilingheight++;
|
||||
if (rover->alpha < 255) lastceilingheight += EQUAL_EPSILON;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -689,7 +689,7 @@ void GLFlat::ProcessSector(sector_t * frontsector)
|
|||
if (rover->flags&FF_FOG && gl_fixedcolormap) continue;
|
||||
if (!rover->bottom.copied && rover->flags&(FF_INVERTPLANES | FF_BOTHPLANES))
|
||||
{
|
||||
fixed_t ff_bottom=FLOAT2FIXED(rover->bottom.plane->ZatPoint(sector->centerspot));
|
||||
double ff_bottom = rover->bottom.plane->ZatPoint(sector->centerspot);
|
||||
if (ff_bottom > lastfloorheight || (rover->flags&FF_FIX))
|
||||
{
|
||||
if (ViewPos.Z >= rover->bottom.plane->ZatPoint(ViewPos))
|
||||
|
@ -710,7 +710,7 @@ void GLFlat::ProcessSector(sector_t * frontsector)
|
|||
}
|
||||
if (!rover->top.copied && !(rover->flags&FF_INVERTPLANES))
|
||||
{
|
||||
fixed_t ff_top=FLOAT2FIXED(rover->top.plane->ZatPoint(sector->centerspot));
|
||||
double ff_top = rover->top.plane->ZatPoint(sector->centerspot);
|
||||
if (ff_top > lastfloorheight)
|
||||
{
|
||||
if (ViewPos.Z >= rover->top.plane->ZatPoint(ViewPos))
|
||||
|
@ -720,7 +720,7 @@ void GLFlat::ProcessSector(sector_t * frontsector)
|
|||
Process(rover->top.model, rover->top.isceiling, !!(rover->flags&FF_FOG));
|
||||
}
|
||||
lastfloorheight = ff_top;
|
||||
if (rover->alpha<255) lastfloorheight--;
|
||||
if (rover->alpha < 255) lastfloorheight -= EQUAL_EPSILON;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue