]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
changed Mod_Q3BSP_LoadEffects to allow brushindex -1 (for effects applied to the...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 7 Sep 2005 17:41:03 +0000 (17:41 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 7 Sep 2005 17:41:03 +0000 (17:41 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5695 d7cf8633-e32d-0410-b094-e92efae38249

model_brush.c

index 430de3fbbc06a06e607ead60a857e8cdbd325480..6e46b5fec7a631212f1c0d698182c9d2671fb620 100644 (file)
@@ -4119,8 +4119,11 @@ static void Mod_Q3BSP_LoadEffects(lump_t *l)
        {
                strlcpy (out->shadername, in->shadername, sizeof (out->shadername));
                n = LittleLong(in->brushindex);
-               if (n < 0 || n >= loadmodel->brush.num_brushes)
-                       Host_Error("Mod_Q3BSP_LoadEffects: invalid brushindex %i (%i brushes)\n", n, loadmodel->brush.num_brushes);
+               if (n >= loadmodel->brush.num_brushes)
+               {
+                       Con_Printf("Mod_Q3BSP_LoadEffects: invalid brushindex %i (%i brushes), setting to -1\n", n, loadmodel->brush.num_brushes);
+                       n = -1;
+               }
                out->brushindex = n;
                out->unknown = LittleLong(in->unknown);
        }