mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- new renderer: fixed bad positioning when a y-flipped wall sprite had to be clipped to floor or ceiling.
This commit is contained in:
parent
60fe1d32fb
commit
5bb438b817
1 changed files with 9 additions and 2 deletions
|
@ -1088,10 +1088,17 @@ void HWWall::ProcessWallSprite(HWDrawInfo* di, spritetype* spr, sectortype* sect
|
|||
|
||||
zbottom[0] = zbottom[1] = (sprz) * (1 / -256.);
|
||||
ztop[0] = ztop[1] = (sprz - ((height * spr->yrepeat) << 2)) * (1 / -256.);
|
||||
if (zbottom[0] > ztop[0])
|
||||
{
|
||||
// reorder coordinates to make the clipping code below behave.
|
||||
auto zz = zbottom[0];
|
||||
zbottom[0] = zbottom[1] = ztop[0];
|
||||
ztop[0] = ztop[1] = zz;
|
||||
}
|
||||
|
||||
// Clip sprites to ceilings/floors
|
||||
float origz = ztop[0];
|
||||
float polyh = (zbottom[0] - origz);
|
||||
float origz = zbottom[0];
|
||||
float polyh = (ztop[0] - origz);
|
||||
if (!(sector->ceilingstat & CSTAT_SECTOR_SKY))
|
||||
{
|
||||
float ceilingz = sector->ceilingz * (1 / -256.f);
|
||||
|
|
Loading…
Reference in a new issue