From 478e81be105fb15d0e05e260203bc5312ed3a062 Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 10 Jan 2006 14:52:21 +0000 Subject: [PATCH] added rain splash code written by [515], and made the splash sparks a bit wider so that they are noticable git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5893 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_particles.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cl_particles.c b/cl_particles.c index d49affc9..3fccb93e 100644 --- a/cl_particles.c +++ b/cl_particles.c @@ -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) -- 2.39.2