From 7b808fb7853ad4ec6f947e5850a0b342e9d8a500 Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 7 Sep 2005 17:41:03 +0000 Subject: [PATCH] changed Mod_Q3BSP_LoadEffects to allow brushindex -1 (for effects applied to the whole map), and made it use a warning instead of an error for invalid brushindex git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5695 d7cf8633-e32d-0410-b094-e92efae38249 --- model_brush.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/model_brush.c b/model_brush.c index 430de3fb..6e46b5fe 100644 --- a/model_brush.c +++ b/model_brush.c @@ -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); } -- 2.39.2