]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
q1bsp: Only warn once per "bad animating texture".
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 16 Jun 2015 19:58:53 +0000 (19:58 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 16 Jun 2015 19:58:53 +0000 (19:58 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12211 d7cf8633-e32d-0410-b094-e92efae38249

model_brush.c

index 66cb6d0bac5465db8c88bc4cedf14ac6fc99d7fa..36053f513b656ef6e2edcd0f2ef2d62310c17751 100644 (file)
@@ -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;