From a903cbe12e9122ba0b325321cc2ad8e241da73ac Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 24 Aug 2014 13:10:45 +0200 Subject: [PATCH] - sorting draw items by light level no longer makes sense so remove all corresponding code from dicmp. --- src/gl/scene/gl_drawinfo.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/gl/scene/gl_drawinfo.cpp b/src/gl/scene/gl_drawinfo.cpp index 2cda1e396b..050860a48d 100644 --- a/src/gl/scene/gl_drawinfo.cpp +++ b/src/gl/scene/gl_drawinfo.cpp @@ -794,7 +794,6 @@ static int __cdecl dicmp (const void *a, const void *b) { const GLDrawItem * di[2]; FMaterial * tx[2]; - int lights[2]; int clamp[2]; //colormap_t cm[2]; di[0]=(const GLDrawItem *)a; @@ -808,7 +807,6 @@ static int __cdecl dicmp (const void *a, const void *b) { GLFlat * f=&sortinfo->flats[di[i]->index]; tx[i]=f->gltexture; - lights[i]=f->lightlevel; clamp[i] = 0; } break; @@ -817,7 +815,6 @@ static int __cdecl dicmp (const void *a, const void *b) { GLWall * w=&sortinfo->walls[di[i]->index]; tx[i]=w->gltexture; - lights[i]=w->lightlevel; clamp[i] = w->flags & 3; } break; @@ -826,16 +823,14 @@ static int __cdecl dicmp (const void *a, const void *b) { GLSprite * s=&sortinfo->sprites[di[i]->index]; tx[i]=s->gltexture; - lights[i]=s->lightlevel; - clamp[i] = 4; + clamp[i] = 3; } break; case GLDIT_POLY: break; } } if (tx[0]!=tx[1]) return tx[0]-tx[1]; - if (clamp[0]!=clamp[1]) return clamp[0]-clamp[1]; // clamping forces different textures. - return lights[0]-lights[1]; + return clamp[0]-clamp[1]; // clamping forces different textures. }