From 00b5bee51b6666dac2484da93decc9ebf5e65256 Mon Sep 17 00:00:00 2001 From: divverent Date: Tue, 16 Jun 2015 19:59:01 +0000 Subject: [PATCH] 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 --- model_brush.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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++) { -- 2.39.2