From 79e43f1b2f8e91b9272739ee9a6a29fa6bab3128 Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 2 Mar 2008 16:03:47 +0000 Subject: [PATCH] improved CL_ParticleTrail's check for unknown effect numbers git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8181 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_particles.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cl_particles.c b/cl_particles.c index 9647bdcf..eb98eb37 100644 --- a/cl_particles.c +++ b/cl_particles.c @@ -1118,13 +1118,11 @@ void CL_ParticleTrail(int effectnameindex, float pcount, const vec3_t originmins { vec3_t center; qboolean found = false; - if (effectnameindex < 1 || effectnameindex >= MAX_PARTICLEEFFECTNAME) + if (effectnameindex < 1 || effectnameindex >= MAX_PARTICLEEFFECTNAME || !particleeffectname[effectnameindex][0]) { Con_DPrintf("Unknown effect number %i received from server\n", effectnameindex); - return; // invalid effect index - } - if (!particleeffectname[effectnameindex][0]) return; // no such effect + } VectorLerp(originmins, 0.5, originmaxs, center); if (!cl_particles_quake.integer && particleeffectinfo[0].effectnameindex) { -- 2.39.2