Also fixed it for MD2s

This commit is contained in:
RedEnchilada 2016-02-21 23:02:09 -06:00
parent ce793dfe28
commit bcd05b1c63

View file

@ -4520,11 +4520,10 @@ static void HWR_SortVisSprites(void)
gr_vsprsortedhead.next = gr_vsprsortedhead.prev = &gr_vsprsortedhead;
for (i = 0; i < gr_visspritecount; i++)
{
bestdist = ZCLIP_PLANE-1;
bestdispoffset = INT32_MAX;
best = NULL;
for (ds = unsorted.next; ds != &unsorted; ds = ds->next)
{
if (ds->tz > bestdist)
if (!best || ds->tz > bestdist)
{
bestdist = ds->tz;
bestdispoffset = ds->dispoffset;