]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fixed bug which caused all models to be untextured if they used internal skins
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 30 Aug 2002 02:20:42 +0000 (02:20 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 30 Aug 2002 02:20:42 +0000 (02:20 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2313 d7cf8633-e32d-0410-b094-e92efae38249

model_alias.c

index 6e7655495346848b77a51437780a85940d5f7e2a..c62cb9c98d47324777a0b8a6320a463a306e0077 100644 (file)
@@ -224,12 +224,12 @@ static int Mod_LoadExternalSkin (char *basename, skinframe_t *skinframe, int pre
        skinframe->shirt  = loadtextureimage(loadmodel->texturepool, va("%s_shirt" , basename), 0, 0, false, r_mipskins.integer, precache);
        skinframe->glow   = loadtextureimage(loadmodel->texturepool, va("%s_glow"  , basename), 0, 0, false, r_mipskins.integer, precache);
        skinframe->merged = NULL;
-       return skinframe->base != NULL || skinframe->pants != NULL || skinframe->shirt != NULL || skinframe->glow != NULL || skinframe->merged != NULL || skinframe->fog != NULL;
+       return skinframe->base != NULL || skinframe->pants != NULL || skinframe->shirt != NULL || skinframe->glow != NULL;
 }
 
 static int Mod_LoadInternalSkin (char *basename, qbyte *skindata, qbyte *skintemp, int width, int height, skinframe_t *skinframe, int precache)
 {
-       if (skindata && skintemp)
+       if (!skindata || !skintemp)
                return false;
        skinframe->pants  = GL_SkinSplitShirt(skindata, skintemp, width, height, 0x0040, va("%s_pants", basename), false); // pants
        skinframe->shirt  = GL_SkinSplitShirt(skindata, skintemp, width, height, 0x0002, va("%s_shirt", basename), false); // shirt