From: divverent Date: Tue, 16 Jun 2015 19:59:01 +0000 (+0000) Subject: q1bsp: Warn if a texture has an altframe but no frame. X-Git-Tag: xonotic-v0.8.5~88^2~108 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=00b5bee51b6666dac2484da93decc9ebf5e65256;p=xonotic%2Fdarkplaces.git q1bsp: Warn if a texture has an altframe but no frame. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12213 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/model_brush.c b/model_brush.c index 9d5a4b08..ce195bd2 100644 --- a/model_brush.c +++ b/model_brush.c @@ -1976,6 +1976,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++) {