mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-30 21:20:54 +00:00
* Always remove linkdraw vissprites from unsorted drawing chain.
* Make the related I_Error more descriptive and "#define PARANOIA"'d only.
This commit is contained in:
parent
dda9148e56
commit
b2fc2e03ba
1 changed files with 12 additions and 7 deletions
|
@ -1845,11 +1845,16 @@ void R_SortVisSprites(void)
|
||||||
&& dsfirst->sz < ds->sz)
|
&& dsfirst->sz < ds->sz)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// remove from chain
|
// remove from chain
|
||||||
ds->next->prev = ds->prev;
|
ds->next->prev = ds->prev;
|
||||||
ds->prev->next = ds->next;
|
ds->prev->next = ds->next;
|
||||||
linkedvissprites++;
|
linkedvissprites++;
|
||||||
|
|
||||||
|
if (dsfirst != &unsorted)
|
||||||
|
{
|
||||||
if (!(ds->cut & SC_FULLBRIGHT))
|
if (!(ds->cut & SC_FULLBRIGHT))
|
||||||
ds->colormap = dsfirst->colormap;
|
ds->colormap = dsfirst->colormap;
|
||||||
ds->extra_colormap = dsfirst->extra_colormap;
|
ds->extra_colormap = dsfirst->extra_colormap;
|
||||||
|
@ -1870,8 +1875,6 @@ void R_SortVisSprites(void)
|
||||||
ds->next = dsnext->next;
|
ds->next = dsnext->next;
|
||||||
dsnext->next = ds;
|
dsnext->next = ds;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1882,8 +1885,10 @@ void R_SortVisSprites(void)
|
||||||
bestscale = bestdispoffset = INT32_MAX;
|
bestscale = bestdispoffset = INT32_MAX;
|
||||||
for (ds = unsorted.next; ds != &unsorted; ds = ds->next)
|
for (ds = unsorted.next; ds != &unsorted; ds = ds->next)
|
||||||
{
|
{
|
||||||
|
#ifdef PARANOIA
|
||||||
if (ds->cut & SC_LINKDRAW)
|
if (ds->cut & SC_LINKDRAW)
|
||||||
I_Error("No link made!"); // testing
|
I_Error("R_SortVisSprites: no link or discardal made for linkdraw!");
|
||||||
|
#endif
|
||||||
|
|
||||||
if (ds->sortscale < bestscale)
|
if (ds->sortscale < bestscale)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue