]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
made TE_EXPLOSION2 use a spherical spawn pattern rather than cube shape
authortomaz <tomaz@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 8 Aug 2004 21:49:43 +0000 (21:49 +0000)
committertomaz <tomaz@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 8 Aug 2004 21:49:43 +0000 (21:49 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4315 d7cf8633-e32d-0410-b094-e92efae38249

cl_particles.c

index ea908c146c4566f44e532d164908ae365dcc3c7b..49e28d9a63fb3206815d401b2fde8c830b21ccd1 100644 (file)
@@ -707,13 +707,18 @@ CL_ParticleExplosion2
 */
 void CL_ParticleExplosion2 (vec3_t org, int colorStart, int colorLength)
 {
+       vec3_t vel;
+       vec3_t offset;
        int i, k;
        if (!cl_particles.integer) return;
 
        for (i = 0;i < 512 * cl_particles_quality.value;i++)
        {
+               VectorRandom (offset);
+               VectorScale (offset, 192, vel);
+               VectorScale (offset, 8, offset);
                k = particlepalette[colorStart + (i % colorLength)];
-               particle(pt_static, PARTICLE_BILLBOARD, k, k, tex_particle, false, PBLEND_ALPHA, 1.5, 1.5, (1.0f / cl_particles_quality.value) * 255, (1.0f / cl_particles_quality.value) * 384, 0.3, 0, 0, org[0] + lhrandom(-8, 8), org[1] + lhrandom(-8, 8), org[2] + lhrandom(-8, 8), lhrandom(-192, 192), lhrandom(-192, 192), lhrandom(-192, 192), 0, 0, 0, 0, 1, 0);
+               particle(pt_static, PARTICLE_BILLBOARD, k, k, tex_particle, false, PBLEND_ALPHA, 1.5, 1.5, (1.0f / cl_particles_quality.value) * 255, (1.0f / cl_particles_quality.value) * 384, 0.3, 0, 0, org[0] + offset[0], org[1] + offset[1], org[2] + offset[2], vel[0], vel[1], vel[2], 0, 0, 0, 0, 1, 0);
        }
 }