]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
made MAX_LIGHTSTYLES error into a warning and it now checks cl_max_lightstyle instead
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 7 Feb 2006 15:08:16 +0000 (15:08 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 7 Feb 2006 15:08:16 +0000 (15:08 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5949 d7cf8633-e32d-0410-b094-e92efae38249

cl_parse.c

index 6b0c31fbb2fcaa4d4d04ab4a743cba11fd11d104..aa58c5146e7de84b301fdce5be5fb628b0c09f5f 100644 (file)
@@ -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);