]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
q1bsp: Warn if a texture has an altframe but no frame.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 16 Jun 2015 19:59:01 +0000 (19:59 +0000)
committerRudolf Polzer <divverent@xonotic.org>
Sat, 17 Oct 2015 22:43:21 +0000 (00:43 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12213 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=00b5bee51b6666dac2484da93decc9ebf5e65256

model_brush.c

index 9d5a4b08805d503a380fcb62dd7a37aac81bb8cc..ce195bd2f9078a3c62f2e193346e20b121e2220f 100644 (file)
@@ -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++)
                {