From: havoc Date: Fri, 30 Jul 2010 06:22:01 +0000 (+0000) Subject: a different fix for colormod on unusual blendfuncs than the last one X-Git-Tag: xonotic-v0.1.0preview~301 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0870695636ce9df0ad4f140c7faa81955d6d3116;p=xonotic%2Fdarkplaces.git a different fix for colormod on unusual blendfuncs than the last one (unusual being anything other than add or alpha) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10369 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=e0410fecc50dfcc3c1a51c9d433067ee5b52b815 --- diff --git a/gl_rmain.c b/gl_rmain.c index 637e5be5..13649502 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -9502,6 +9502,9 @@ texture_t *R_GetCurrentTexture(texture_t *t) } Vector4Set(t->lightmapcolor, rsurface.colormod[0], rsurface.colormod[1], rsurface.colormod[2], t->currentalpha); + // don't colormod customblend textures + if (t->currentmaterialflags & MATERIALFLAG_CUSTOMBLEND) + VectorSet(t->lightmapcolor, 1, 1, 1); VectorClear(t->dlightcolor); t->currentnumlayers = 0; if (t->currentmaterialflags & MATERIALFLAG_WALL) @@ -9520,8 +9523,6 @@ texture_t *R_GetCurrentTexture(texture_t *t) } else if (t->currentmaterialflags & MATERIALFLAG_CUSTOMBLEND) { - // don't colormod customblend textures - VectorSet(t->lightmapcolor, 1, 1, 1); blendfunc1 = t->customblendfunc[0]; blendfunc2 = t->customblendfunc[1]; }