]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
thanks to blub for locating the texture blending bug
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 10 Feb 2008 21:37:14 +0000 (21:37 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 10 Feb 2008 21:37:14 +0000 (21:37 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8080 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 8d03b5ac8b0bd3f46b1161c6832480ed533ace9e..74339a753f86880bc14e483c7cdb84b2ee4bebab 100644 (file)
@@ -5864,8 +5864,11 @@ static void R_DrawTextureSurfaceList_GL20(int texturenumsurfaces, msurface_t **t
                R_Mesh_TexBind(GL20TU_SECONDARY_GLOSS, R_GetTexture(rsurface.texture->backgroundglosstexture));
                R_Mesh_TexBind(GL20TU_SECONDARY_GLOW, R_GetTexture(rsurface.texture->backgroundcurrentskinframe->glow));
        }
-       R_Mesh_TexBind(GL20TU_PANTS, R_GetTexture(rsurface.texture->currentskinframe->pants));
-       R_Mesh_TexBind(GL20TU_SHIRT, R_GetTexture(rsurface.texture->currentskinframe->shirt));
+       if(rsurface.texture->colormapping)
+       {
+               R_Mesh_TexBind(GL20TU_PANTS, R_GetTexture(rsurface.texture->currentskinframe->pants));
+               R_Mesh_TexBind(GL20TU_SHIRT, R_GetTexture(rsurface.texture->currentskinframe->shirt));
+       }
        R_Mesh_TexBind(GL20TU_FOGMASK, R_GetTexture(r_texture_fogattenuation));
        if ((rsurface.uselightmaptexture || (rsurface.texture->currentmaterialflags & MATERIALFLAG_FULLBRIGHT)) && !(rsurface.texture->currentmaterialflags & MATERIALFLAG_VERTEXTEXTUREBLEND))
                R_Mesh_ColorPointer(NULL, 0, 0);