]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix sprite transparency bug introduced by the palette changes
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 27 Dec 2005 02:43:33 +0000 (02:43 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 27 Dec 2005 02:43:33 +0000 (02:43 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5866 d7cf8633-e32d-0410-b094-e92efae38249

model_shared.c

index 91d2063bd7938ecfa548951ccbd2154d6ae76343..0565f206aeea1f8e76a129c29265964300d15870 100644 (file)
@@ -1004,7 +1004,7 @@ int Mod_LoadSkinFrame_Internal(skinframe_t *skinframe, const char *basename, int
                        Mem_Free(temp1);
                }
                // use either a custom palette, or the quake palette
-               skinframe->base = skinframe->merged = GL_TextureForSkinLayer(skindata, width, height, va("%s_merged", basename), palette ? palette : (loadglowtexture ? palette_nofullbrights : palette_complete), textureflags); // all
+               skinframe->base = skinframe->merged = GL_TextureForSkinLayer(skindata, width, height, va("%s_merged", basename), palette ? palette : (loadglowtexture ? palette_nofullbrights : ((textureflags & TEXF_ALPHA) ? palette_transparent : palette_complete)), textureflags); // all
                if (!palette && loadglowtexture)
                        skinframe->glow = GL_TextureForSkinLayer(skindata, width, height, va("%s_glow", basename), palette_onlyfullbrights, textureflags); // glow
                if (!palette && loadpantsandshirt)