From 28d23baa5a073e2e23308e132bed1e3e3a81cfa6 Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 25 Feb 2010 16:11:50 +0000 Subject: [PATCH] fix crash when MAX_DLIGHTS is hit and a trail effect tries to add a dlight git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10003 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=87af9c2ada6e612040e77f1291f75c5ff15ae031 --- cl_particles.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cl_particles.c b/cl_particles.c index 6dd333cf..b1d3dc7c 100644 --- a/cl_particles.c +++ b/cl_particles.c @@ -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 -- 2.39.2