From 1b2f7e565129f79901e2b4d82954aca65e4d1b5e Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 9 Mar 2012 04:48:02 +0000 Subject: [PATCH] fixed a severely bugged check of R_BlendFuncFlags 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 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gl_rmain.c b/gl_rmain.c index 07faae9a..3c5177ae 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -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 -- 2.39.2