mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
engine.cpp: fix sprite sorting/adjustment issue introduced in r7612 that caused sprites with the same y value at the end of the sorted array to not be adjusted properly
git-svn-id: https://svn.eduke32.com/eduke32@7627 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
fc636b53ca
commit
78d08b3ac2
1 changed files with 4 additions and 4 deletions
|
@ -8533,7 +8533,7 @@ killsprite:
|
||||||
spritesxyz[i].y = yp;
|
spritesxyz[i].y = yp;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t gap, ys;
|
int32_t gap, y, ys;
|
||||||
|
|
||||||
gap = 1; while (gap < spritesortcnt) gap = (gap<<1)+1;
|
gap = 1; while (gap < spritesortcnt) gap = (gap<<1)+1;
|
||||||
for (gap>>=1; gap>0; gap>>=1) //Sort sprite list
|
for (gap>>=1; gap>0; gap>>=1) //Sort sprite list
|
||||||
|
@ -8549,11 +8549,11 @@ killsprite:
|
||||||
ys = spritesxyz[0].y; i = 0;
|
ys = spritesxyz[0].y; i = 0;
|
||||||
for (bssize_t j=1; j<=spritesortcnt; j++)
|
for (bssize_t j=1; j<=spritesortcnt; j++)
|
||||||
{
|
{
|
||||||
if (j == spritesortcnt ||
|
y = spritesxyz[j].y^(j == spritesortcnt);
|
||||||
spritesxyz[j].y == ys)
|
if (y == ys)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ys = spritesxyz[j].y;
|
ys = y;
|
||||||
|
|
||||||
if (j > i+1)
|
if (j > i+1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue