]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fixed a severely bugged check of R_BlendFuncFlags
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 9 Mar 2012 04:48:02 +0000 (04:48 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 9 Mar 2012 04:48:02 +0000 (04:48 +0000)
removed a redundant lightmap update loop
thanks to Klaus Silveira for pointing out these issues

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11748 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 07faae9a191ecd7453f081cb001dad19ffac4691..3c5177aeee37d434c78869af829a439e27e2d56c 100644 (file)
@@ -8006,7 +8006,7 @@ texture_t *R_GetCurrentTexture(texture_t *t)
                        blendfunc2 = GL_ZERO;
                }
                // don't colormod evilblend textures
-               if(!R_BlendFuncFlags(blendfunc1, blendfunc2) & BLENDFUNC_ALLOWS_COLORMOD)
+               if(!(R_BlendFuncFlags(blendfunc1, blendfunc2) & BLENDFUNC_ALLOWS_COLORMOD))
                        VectorSet(t->lightmapcolor, 1, 1, 1);
                depthmask = !(t->currentmaterialflags & MATERIALFLAG_BLENDED);
                if (t->currentmaterialflags & MATERIALFLAG_FULLBRIGHT)
@@ -11829,10 +11829,7 @@ void R_DrawModelSurfaces(entity_render_t *ent, qboolean skysurfaces, qboolean wr
                        }
                }
        }
-       if (update)
-               for (j = model->firstmodelsurface, endj = model->firstmodelsurface + model->nummodelsurfaces;j < endj;j++)
-                       if (update[j])
-                               R_BuildLightMap(ent, surfaces + j);
+
        R_QueueModelSurfaceList(ent, numsurfacelist, r_surfacelist, flagsmask, writedepth, depthonly, prepass);
 
        // add to stats if desired