From e0410fecc50dfcc3c1a51c9d433067ee5b52b815 Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 30 Jul 2010 06:22:01 +0000 Subject: [PATCH] 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 --- gl_rmain.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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]; } -- 2.39.2