]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
added rain splash code written by [515], and made the splash sparks a bit wider so...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 10 Jan 2006 14:52:21 +0000 (14:52 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 10 Jan 2006 14:52:21 +0000 (14:52 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5893 d7cf8633-e32d-0410-b094-e92efae38249

cl_particles.c

index d49affc92c4c3464896070d9973ee8001206a9bb..3fccb93e8ddab1d71884bd386d4f78199891e5ff 100644 (file)
@@ -1496,6 +1496,7 @@ void CL_MoveParticles (void)
                                        trace = CL_TraceBox(oldorg, vec3_origin, vec3_origin, p->org, true, NULL, SUPERCONTENTS_SOLID | SUPERCONTENTS_LIQUIDSMASK, false);
                                        if (trace.fraction < 1)
                                        {
+                                               int count;
                                                // convert from a raindrop particle to a rainsplash decal
                                                VectorCopy(trace.endpos, p->org);
                                                VectorCopy(trace.plane.normal, p->vel);
@@ -1508,6 +1509,9 @@ void CL_MoveParticles (void)
                                                p->friction = 0;
                                                p->gravity = 0;
                                                p->size = 8.0;
+                                               count = rand() & 3;
+                                               while(count--)
+                                                       particle(particletype + pt_spark, 0x000000, 0x707070, tex_particle, 0.25f, (1.0f / cl_particles_quality.value) * lhrandom(64, 255), (1.0f / cl_particles_quality.value) * 512, 1, 0, p->org[0], p->org[1], p->org[2], p->vel[0]*16, p->vel[1]*16, 32 + p->vel[2]*16, 0, 0, 32);
                                        }
                                }
                                else if (p->type == particletype + pt_blood)