X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=model_brush.c;h=2761d7d670d38b7d2f6e7e559789b5e80f9ea65b;hb=c5b7dc9addac09cbfab5e592e9b2feea8d7da241;hp=9d5a4b08805d503a380fcb62dd7a37aac81bb8cc;hpb=fc2008eb07881331f8313519ce870e720b3f2388;p=xonotic%2Fdarkplaces.git diff --git a/model_brush.c b/model_brush.c index 9d5a4b08..2761d7d6 100644 --- a/model_brush.c +++ b/model_brush.c @@ -1880,6 +1880,10 @@ static void Mod_Q1BSP_LoadTextures(sizebuf_t *sb) if (tx->skinframes[0] && tx->skinframes[0]->hasalpha) tx->basematerialflags |= MATERIALFLAG_ALPHA | MATERIALFLAG_BLENDED | MATERIALFLAG_NOSHADOW; } + else if (tx->name[0] == '{') // fence textures + { + tx->basematerialflags |= MATERIALFLAG_ALPHATEST | MATERIALFLAG_NOSHADOW; + } else if (!strncmp(tx->name, "mirror", 6)) // Tenebrae { // replace the texture with black @@ -1976,6 +1980,18 @@ static void Mod_Q1BSP_LoadTextures(sizebuf_t *sb) altanims[k] = anims[k]; } + if (max < 1) + { + // Warn. + Con_Printf("Missing frame 0 of %s\n", tx->name); + + // however, we can handle this by duplicating the alternate animation into the primary + max = altmax; + for (k = 0;k < 10;k++) + anims[k] = altanims[k]; + } + + // link together the primary animation for (j = 0;j < max;j++) {