]> 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)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 9 Mar 2012 19:02:20 +0000 (20:02 +0100)
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
::stable-branch::merge=1b2f7e565129f79901e2b4d82954aca65e4d1b5e

gl_rmain.c

index 96c2c8a43cb3e4a9b17ce1ce3e3893ce03a86b85..e835edbfddf7f11ec4a78871898c284017c12580 100644 (file)
@@ -7989,7 +7989,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)
@@ -11812,10 +11812,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