mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-09 09:10:54 +00:00
R_DrawEntitiesOnList: revert entity texture sorting added in r1151 as it introduces wrong alpha-sorting in contract revoked start.bsp
reported here: http://www.celephais.net/board/view_thread.php?id=60452&start=1515 git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1234 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
286ffcb95a
commit
271f05bf63
1 changed files with 1 additions and 12 deletions
|
@ -594,11 +594,6 @@ void R_SetupView (void)
|
||||||
//
|
//
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
||||||
static int R_EntitySortFunc(const void *a, const void *b)
|
|
||||||
{
|
|
||||||
return (*(entity_t **)a)->model - (*(entity_t **)b)->model;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============
|
=============
|
||||||
R_DrawEntitiesOnList
|
R_DrawEntitiesOnList
|
||||||
|
@ -606,21 +601,15 @@ R_DrawEntitiesOnList
|
||||||
*/
|
*/
|
||||||
void R_DrawEntitiesOnList (qboolean alphapass) //johnfitz -- added parameter
|
void R_DrawEntitiesOnList (qboolean alphapass) //johnfitz -- added parameter
|
||||||
{
|
{
|
||||||
entity_t *entities_sorted[MAX_VISEDICTS];
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!r_drawentities.value)
|
if (!r_drawentities.value)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//ericw -- draw the entities sorted by model, to eliminate redundant texture binding
|
|
||||||
memcpy (entities_sorted, cl_visedicts, cl_numvisedicts * sizeof(entity_t *));
|
|
||||||
qsort (entities_sorted, cl_numvisedicts, sizeof(entity_t *), R_EntitySortFunc);
|
|
||||||
//ericw --
|
|
||||||
|
|
||||||
//johnfitz -- sprites are not a special case
|
//johnfitz -- sprites are not a special case
|
||||||
for (i=0 ; i<cl_numvisedicts ; i++)
|
for (i=0 ; i<cl_numvisedicts ; i++)
|
||||||
{
|
{
|
||||||
currententity = entities_sorted[i];
|
currententity = cl_visedicts[i];
|
||||||
|
|
||||||
//johnfitz -- if alphapass is true, draw only alpha entites this time
|
//johnfitz -- if alphapass is true, draw only alpha entites this time
|
||||||
//if alphapass is false, draw only nonalpha entities this time
|
//if alphapass is false, draw only nonalpha entities this time
|
||||||
|
|
Loading…
Reference in a new issue