From 32079cc7d9d5dcfa17451589e9b8ef93aab7ca9b Mon Sep 17 00:00:00 2001 From: divverent Date: Tue, 16 Jun 2015 19:58:53 +0000 Subject: [PATCH] q1bsp: Only warn once per "bad animating texture". git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12211 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=6dda81876a4b2aabb80300ba03fb03d314171029 --- model_brush.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/model_brush.c b/model_brush.c index 66cb6d0b..36053f51 100644 --- a/model_brush.c +++ b/model_brush.c @@ -1904,6 +1904,12 @@ static void Mod_Q1BSP_LoadTextures(sizebuf_t *sb) tx = loadmodel->data_textures + i; if (!tx || tx->name[0] != '+' || tx->name[1] == 0 || tx->name[2] == 0) continue; + num = tx->name[1]; + if ((num < '0' || num > '9') && (num < 'a' || num > 'j')) + { + Con_Printf("Bad animating texture %s\n", tx->name); + continue; + } if (tx->anim_total[0] || tx->anim_total[1]) continue; // already sequenced @@ -1922,8 +1928,7 @@ static void Mod_Q1BSP_LoadTextures(sizebuf_t *sb) anims[num - '0'] = tx2; else if (num >= 'a' && num <= 'j') altanims[num - 'a'] = tx2; - else - Con_Printf("Bad animating texture %s\n", tx->name); + // No need to warn otherwise - we already did above. } max = altmax = 0; -- 2.39.2