don't draw glow twice when gl_combine is on
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 17 Apr 2005 08:32:21 +0000 (08:32 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 17 Apr 2005 08:32:21 +0000 (08:32 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5187 d7cf8633-e32d-0410-b094-e92efae38249

gl_models.c

index 3408ced..5dfc5bc 100644 (file)
@@ -222,13 +222,13 @@ static void R_DrawAliasModelCallback (const void *calldata1, int calldata2)
 
        colorscale = 1;
        m.texrgbscale[0] = 0;
+       m.pointer_color = NULL;
 
-       if (texture->skin.glow)
+       if (doglow)
        {
                GL_BlendFunc(GL_SRC_ALPHA, GL_ONE);
                GL_DepthMask(false);
                m.tex[0] = R_GetTexture(texture->skin.glow);
-               m.pointer_color = NULL;
                GL_Color(1, 1, 1, ent->alpha);
                R_Mesh_State(&m);
                c_alias_polys += mesh->num_triangles;
@@ -242,7 +242,6 @@ static void R_DrawAliasModelCallback (const void *calldata1, int calldata2)
                GL_BlendFunc(GL_SRC_ALPHA, GL_ONE);
                GL_DepthMask(false);
                m.tex[0] = R_GetTexture(texture->skin.fog);
-               m.pointer_color = NULL;
                GL_Color(fogcolor[0], fogcolor[1], fogcolor[2], fog * ent->alpha);
                R_Mesh_State(&m);
                c_alias_polys += mesh->num_triangles;