]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
improved CL_ParticleTrail's check for unknown effect numbers
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 2 Mar 2008 16:03:47 +0000 (16:03 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 2 Mar 2008 16:03:47 +0000 (16:03 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8181 d7cf8633-e32d-0410-b094-e92efae38249

cl_particles.c

index 9647bdcf1ddb1a31977b8118829e9cb0c4fd4547..eb98eb37efa6e234f9656f554511b4a36ddfa797 100644 (file)
@@ -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)
        {