]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix crash when MAX_DLIGHTS is hit and a trail effect tries to add a
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 25 Feb 2010 16:11:50 +0000 (16:11 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 25 Feb 2010 16:11:50 +0000 (16:11 +0000)
dlight

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10003 d7cf8633-e32d-0410-b094-e92efae38249

cl_particles.c

index 6dd333cf34e4796c5027edd116be6022cbb86cdc..b1d3dc7c780e288d071a3394a7ef2a103479984a 100644 (file)
@@ -1389,7 +1389,7 @@ void CL_ParticleTrail(int effectnameindex, float pcount, const vec3_t originmins
                                                // called when effect starts
                                                CL_AllocLightFlash(NULL, &tempmatrix, info->lightradiusstart, info->lightcolor[0], info->lightcolor[1], info->lightcolor[2], info->lightradiusfade, info->lighttime, info->lightcubemapnum, -1, info->lightshadow, 1, 0.25, 0, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
                                        }
-                                       else
+                                       else if (r_refdef.scene.numlights < MAX_DLIGHTS)
                                        {
                                                // glowing entity
                                                // called by CL_LinkNetworkEntity