changed two MAX_LIGHTSTYLE references to cl_max_lightstyle
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 7 Feb 2006 15:39:51 +0000 (15:39 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 7 Feb 2006 15:39:51 +0000 (15:39 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5951 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c
clvm_cmds.c

index 5299c4d..c39741b 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -649,7 +649,7 @@ void CL_UpdateLights(void)
        f = cl.time * 10;
        i = (int)floor(f);
        frac = f - i;
-       for (j = 0;j < MAX_LIGHTSTYLES;j++)
+       for (j = 0;j < cl_max_lightstyle;j++)
        {
                if (!cl_lightstyle || !cl_lightstyle[j].length)
                {
index 0393f5d..be40e09 100644 (file)
@@ -441,7 +441,7 @@ void VM_CL_lightstyle (void)
 
        i = PRVM_G_FLOAT(OFS_PARM0);
        c = PRVM_G_STRING(OFS_PARM1);
-       if (i >= MAX_LIGHTSTYLES)
+       if (i >= cl_max_lightstyle)
                PF_WARNING("VM_CL_lightstyle >= MAX_LIGHTSTYLES\n");
        strlcpy (cl_lightstyle[i].map,  MSG_ReadString(), sizeof (cl_lightstyle[i].map));
        cl_lightstyle[i].map[MAX_STYLESTRING - 1] = 0;