From: divverent Date: Sun, 6 Dec 2009 18:51:22 +0000 (+0000) Subject: if gridsize is parsed wrong and DP would normally abort when loading the map, instead... X-Git-Tag: xonotic-v0.1.0preview~1099 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5dc679a1dbe88fc6be88a8e15234aab4f462cf45;p=xonotic%2Fdarkplaces.git if gridsize is parsed wrong and DP would normally abort when loading the map, instead make it ignore the lightgrid and spit out a warning git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9547 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/model_brush.c b/model_brush.c index c7df1a20..528c59fa 100644 --- a/model_brush.c +++ b/model_brush.c @@ -5421,7 +5421,10 @@ static void Mod_Q3BSP_LoadLightGrid(lump_t *l) if (l->filelen) { if (l->filelen < count * (int)sizeof(*in)) - Host_Error("Mod_Q3BSP_LoadLightGrid: invalid lightgrid lump size %i bytes, should be %i bytes (%ix%ix%i)", l->filelen, (int)(count * sizeof(*in)), loadmodel->brushq3.num_lightgrid_isize[0], loadmodel->brushq3.num_lightgrid_isize[1], loadmodel->brushq3.num_lightgrid_isize[2]); + { + Con_Printf("Mod_Q3BSP_LoadLightGrid: invalid lightgrid lump size %i bytes, should be %i bytes (%ix%ix%i)", l->filelen, (int)(count * sizeof(*in)), loadmodel->brushq3.num_lightgrid_isize[0], loadmodel->brushq3.num_lightgrid_isize[1], loadmodel->brushq3.num_lightgrid_isize[2]); + return; // ignore the grid if we cannot understand it + } if (l->filelen != count * (int)sizeof(*in)) Con_Printf("Mod_Q3BSP_LoadLightGrid: Warning: calculated lightgrid size %i bytes does not match lump size %i\n", (int)(count * sizeof(*in)), l->filelen); out = (q3dlightgrid_t *)Mem_Alloc(loadmodel->mempool, count * sizeof(*out));