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~230^2~109 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e0410fecc50dfcc3c1a51c9d433067ee5b52b815;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 --- diff --git a/gl_rmain.c b/gl_rmain.c index 6ea51c28..842159fe 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -10442,6 +10442,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) @@ -10460,8 +10463,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]; }