engine.cpp: fix bug in killsprite where sprites were not being removed properly after sorting changes

git-svn-id: https://svn.eduke32.com/eduke32@7623 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
pogokeen 2019-04-30 20:09:23 +00:00 committed by Christoph Oelckers
parent d2ebc8a29c
commit 5865d96306

View file

@ -8474,6 +8474,9 @@ killsprite:
tspriteptr[i] = tspriteptr[spritesortcnt]; tspriteptr[i] = tspriteptr[spritesortcnt];
spritesxyz[i].x = spritesxyz[spritesortcnt].x; spritesxyz[i].x = spritesxyz[spritesortcnt].x;
spritesxyz[i].y = spritesxyz[spritesortcnt].y; spritesxyz[i].y = spritesxyz[spritesortcnt].y;
tspriteptr[spritesortcnt] = tspriteptr[numSprites];
spritesxyz[spritesortcnt].x = spritesxyz[numSprites].x;
spritesxyz[spritesortcnt].y = spritesxyz[numSprites].y;
} }
continue; continue;
} }