From: havoc Date: Tue, 7 Feb 2006 15:08:16 +0000 (+0000) Subject: made MAX_LIGHTSTYLES error into a warning and it now checks cl_max_lightstyle instead X-Git-Tag: xonotic-v0.1.0preview~4356 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0b898651de1687265ef90cbf751a6eefde5f5271;p=xonotic%2Fdarkplaces.git made MAX_LIGHTSTYLES error into a warning and it now checks cl_max_lightstyle instead git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5949 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_parse.c b/cl_parse.c index 6b0c31fb..aa58c514 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -1524,8 +1524,11 @@ void CL_ParseServerMessage(void) case svc_lightstyle: i = MSG_ReadByte (); - if (i >= MAX_LIGHTSTYLES) - Host_Error ("svc_lightstyle >= MAX_LIGHTSTYLES"); + if (i >= cl_max_lightstyle) + { + Con_Printf ("svc_lightstyle >= MAX_LIGHTSTYLES"); + break; + } strlcpy (cl_lightstyle[i].map, MSG_ReadString(), sizeof (cl_lightstyle[i].map)); cl_lightstyle[i].map[MAX_STYLESTRING - 1] = 0; cl_lightstyle[i].length = (int)strlen(cl_lightstyle[i].map);