- ensure that all HWSprites are oriented with z1 > z2.

This is required by the sorting code to work as intended.
This commit is contained in:
Christoph Oelckers 2021-04-07 12:31:47 +02:00
parent f9f1d591b3
commit 59f18f5fa7

View file

@ -437,6 +437,12 @@ void HWSprite::Process(HWDrawInfo* di, spritetype* spr, sectortype* sector, int
z1 = z + yoff;
z2 = z + height + yoff;
if (z1 < z2)
{
// Make sure that z1 is the higher one. Some utilities expect it to be oriented this way.
std::swap(z1, z2);
std::swap(vt, vb);
}
}
else
{