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.2~84 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=00c838a519cfa55ef08a5a9fe4e723e123be9ac9;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 ::stable-branch::merge=00b5bee51b6666dac2484da93decc9ebf5e65256 --- 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++) {