fix external model skins (they weren't rendering)
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 2 Mar 2003 07:18:14 +0000 (07:18 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 2 Mar 2003 07:18:14 +0000 (07:18 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2796 d7cf8633-e32d-0410-b094-e92efae38249

model_alias.c

index db4ce0e..9b0f33e 100644 (file)
@@ -215,7 +215,7 @@ void Mod_BuildAliasSkinFromSkinFrame(aliasskin_t *skin, skinframe_t *skinframe)
        }
        if (skinframe->base != NULL)
        {
-               layer->flags = ALIASLAYER_NODRAW_IF_NOTCOLORMAPPED | ALIASLAYER_DIFFUSE;
+               layer->flags = (skinframe->merged != NULL ? ALIASLAYER_NODRAW_IF_NOTCOLORMAPPED : 0) | ALIASLAYER_DIFFUSE;
                if (skinframe->glow != NULL)
                        layer->flags |= ALIASLAYER_ADD;
                layer->texture = skinframe->base;
@@ -256,7 +256,7 @@ void Mod_BuildAliasSkinFromSkinFrame(aliasskin_t *skin, skinframe_t *skinframe)
        }
        if (skinframe->base != NULL)
        {
-               layer->flags = ALIASLAYER_DRAW_PER_LIGHT | ALIASLAYER_NODRAW_IF_NOTCOLORMAPPED | ALIASLAYER_DIFFUSE;
+               layer->flags = ALIASLAYER_DRAW_PER_LIGHT | (skinframe->merged != NULL ? ALIASLAYER_NODRAW_IF_NOTCOLORMAPPED : 0) | ALIASLAYER_DIFFUSE;
                layer->texture = skinframe->base;
                layer->nmap = skinframe->nmap;
                layer++;