From: lordhavoc Date: Mon, 10 Jun 2002 19:07:21 +0000 (+0000) Subject: get rid of velocity jittering on rain and snow, except for horizontal jitter on snow... X-Git-Tag: RELEASE_0_2_0_RC1~469 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f255888f902462749d84707317962a58c076c0db;p=xonotic%2Fdarkplaces.git get rid of velocity jittering on rain and snow, except for horizontal jitter on snow while falling (since that is a desired effect), should make snow work at low velocities git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1940 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_particles.c b/cl_particles.c index 533f6541..a8ed781c 100644 --- a/cl_particles.c +++ b/cl_particles.c @@ -582,7 +582,6 @@ void CL_ParticleCube (vec3_t mins, vec3_t maxs, vec3_t dir, int count, int color void CL_ParticleRain (vec3_t mins, vec3_t maxs, vec3_t dir, int count, int colorbase, int type) { int k; - vec3_t vel; float t, z; if (!cl_particles.integer) return; if (maxs[0] <= mins[0]) {t = mins[0];mins[0] = maxs[0];maxs[0] = t;} @@ -608,21 +607,15 @@ void CL_ParticleRain (vec3_t mins, vec3_t maxs, vec3_t dir, int count, int color while(count--) { - vel[0] = dir[0] + lhrandom(-16, 16); - vel[1] = dir[1] + lhrandom(-16, 16); - vel[2] = dir[2] + lhrandom(-32, 32); k = particlepalette[colorbase + (rand()&3)]; - particle(pt_rain, PARTICLE_UPRIGHT_FACING, k, k, tex_particle, true, true, 1, 64, 64, t, 0, lhrandom(mins[0], maxs[0]), lhrandom(mins[1], maxs[1]), z, vel[0], vel[1], vel[2], 0, vel[0], vel[1], vel[2], 0, 0); + particle(pt_rain, PARTICLE_UPRIGHT_FACING, k, k, tex_particle, true, true, 1, 64, 64, t, 0, lhrandom(mins[0], maxs[0]), lhrandom(mins[1], maxs[1]), z, dir[0], dir[1], dir[2], 0, dir[0], dir[1], dir[2], 0, 0); } break; case 1: while(count--) { - vel[0] = dir[0] + lhrandom(-16, 16); - vel[1] = dir[1] + lhrandom(-16, 16); - vel[2] = dir[2] + lhrandom(-32, 32); k = particlepalette[colorbase + (rand()&3)]; - particle(pt_snow, PARTICLE_BILLBOARD, k, k, tex_particle, false, true, 1, 1, lhrandom(64, 128), t, 0, lhrandom(mins[0], maxs[0]), lhrandom(mins[1], maxs[1]), z, vel[0], vel[1], vel[2], 0, vel[0], vel[1], vel[2], 0, 0); + particle(pt_snow, PARTICLE_BILLBOARD, k, k, tex_particle, false, true, 1, 1, lhrandom(64, 128), t, 0, lhrandom(mins[0], maxs[0]), lhrandom(mins[1], maxs[1]), z, dir[0], dir[1], dir[2], 0, dir[0], dir[1], dir[2], 0, 0); } break; default: @@ -962,9 +955,9 @@ void CL_MoveParticles (void) if (cl.time > p->time2) { p->time2 = cl.time + (rand() & 3) * 0.1; - p->vel[0] = (rand()&63)-32 + p->vel2[0]; - p->vel[1] = (rand()&63)-32 + p->vel2[1]; - p->vel[2] = (rand()&63)-32 + p->vel2[2]; + p->vel[0] = lhrandom(-32, 32) + p->vel2[0]; + p->vel[1] = lhrandom(-32, 32) + p->vel2[1]; + p->vel[2] = /*lhrandom(-32, 32) +*/ p->vel2[2]; } if (!content) content = Mod_PointInLeaf(p->org, cl.worldmodel)->contents;