This fixes a few quirks seen in q3bsps. We no longer depthsort textures, but sort by shader instead. this is more similar to how q3 works. models are still going to be wierd though.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1313 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-09-14 04:16:36 +00:00
parent 8be4ab3ef4
commit 568eaa66e5

View file

@ -2396,7 +2396,7 @@ mesh_t *GL_CreateMeshForPatch (model_t *mod, int patchwidth, int patchheight, in
void CModQ3_SortShaders(void)
{
/* texture_t *textemp;
texture_t *textemp;
int i, j;
//sort loadmodel->textures
//correct pointers in loadmodel->texinfo
@ -2405,19 +2405,19 @@ void CModQ3_SortShaders(void)
{
for (j = i+1; j < numtexinfo; j++)
{
if (!loadmodel->textures[i]->shader || (loadmodel->textures[j]->shader && loadmodel->textures[j]->shader->sort > loadmodel->textures[i]->shader->sort))
if ((loadmodel->textures[i]->shader && loadmodel->textures[j]->shader) && (loadmodel->textures[j]->shader->sort < loadmodel->textures[i]->shader->sort))
{
textemp = loadmodel->textures[j];
loadmodel->textures[j] = loadmodel->textures[i];
loadmodel->textures[i] = textemp;
textemp = loadmodel->texinfo[j].texture;
loadmodel->texinfo[j].texture = loadmodel->texinfo[i].texture;
loadmodel->texinfo[i].texture = textemp;
if (skytexturenum==i)
skytexturenum=j;
else if (skytexturenum==j)
skytexturenum=i;
}
}
}
*/
}
mesh_t nullmesh;