From: havoc Date: Fri, 30 Aug 2002 02:20:42 +0000 (+0000) Subject: fixed bug which caused all models to be untextured if they used internal skins X-Git-Tag: RELEASE_0_2_0_RC1~291 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a813ceacbfb5f886db24c01f99b7f4c564a0e39b;p=xonotic%2Fdarkplaces.git fixed bug which caused all models to be untextured if they used internal skins git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2313 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/model_alias.c b/model_alias.c index 6e765549..c62cb9c9 100644 --- a/model_alias.c +++ b/model_alias.c @@ -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