From 0c00970ae18c87a48f027cc8c1b817ce825ab411 Mon Sep 17 00:00:00 2001 From: Ragnvald Maartmann-Moe IV Date: Sun, 8 Apr 2001 21:41:53 +0000 Subject: [PATCH] Tweak particle effects extensively. Grenades and blood far cheaper, and better looking. --- qw/source/gl_dyn_part.c | 31 +++++++++++++++---------------- qw/source/gl_dyn_textures.c | 4 ++-- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/qw/source/gl_dyn_part.c b/qw/source/gl_dyn_part.c index 72c264277..993059187 100644 --- a/qw/source/gl_dyn_part.c +++ b/qw/source/gl_dyn_part.c @@ -484,56 +484,55 @@ R_RocketTrail (int type, entity_t *ent) pdie = cl.time + 2; ptype = pt_static; ptex = part_tex_dot; - pcolor = 0; - pscale = .75; palpha = 255; - dist = 1; + pcolor = 0; + pscale = 6; + dist = 40; switch (type) { case 0: // rocket trail - dist = 40; pdie = cl.time + 60; ptype = pt_smokering; - pscale = lhrandom (10, 15); + pscale = lhrandom (9, 12); // Misty-chan: Temporary easter egg pcolor = (rand () & 255); // pcolor = (rand () & 3) + 12; - palpha = 220 + (rand () & 31); + palpha = 128 + (rand () & 31); VectorVectors(vec, right, up); VectorCopy (ent->old_origin, porg); ptex = part_tex_smoke_ring[rand () & 7]; break; case 1: // grenade trail - dist = 4; - pdie = cl.time + 1; ptype = pt_smoke; pscale = lhrandom (6, 9); // Misty-chan: Temporary easter egg. pcolor = (rand () & 255); - // pcolor = (rand () & 3) + 3; - palpha = 48 + (rand () & 31); + // pcolor = (rand () & 2); + palpha = 128 + (rand () & 31); VectorCopy (ent->old_origin, porg); ptex = part_tex_smoke[rand () & 7]; break; - case 4: // slight blood - dist = 4; case 2: // blood - dist = 4; + pscale = 12; + case 4: // slight blood + pscale += lhrandom (0, 3); + ptex = part_tex_smoke[rand () & 7]; pcolor = 68 + (rand () & 3); for (j = 0; j < 3; j++) { - pvel[j] = (rand () & 15) - 8; - porg[j] = ent->old_origin[j] + ((rand () % 3) - 2); + pvel[j] = lhrandom (-3, 3) * type; + porg[j] = ent->old_origin[j] + lhrandom (-1.5, 1.5); } ptype = pt_grav; break; case 6: // voor trail +// Use smoke ring effects here, once merged with nq? --Despair dist = 3; pcolor = 9 * 16 + 8 + (rand () & 3); ptype = pt_static; pscale = lhrandom (.75, 1.5); pdie = cl.time + 0.3; for (j = 0; j < 3; j++) - porg[j] = ent->old_origin[j] + ((rand () & 15) - 8); + porg[j] = ent->old_origin[j] + lhrandom (-8, 8); break; case 3: case 5: // tracer diff --git a/qw/source/gl_dyn_textures.c b/qw/source/gl_dyn_textures.c index 5ee5f4af5..cd0bbd41e 100644 --- a/qw/source/gl_dyn_textures.c +++ b/qw/source/gl_dyn_textures.c @@ -137,7 +137,7 @@ GDT_InitSmokeParticleTexture (void) c = 255 - (dx*dx + dy2); if (c < 1) c = 0; - d = (noise1[y][x] + noise2[y][x]) / 3; + d = (noise1[y][x] + noise2[y][x]) / 2; if (d > 0) { data[y][x][0] = 255; data[y][x][1] = (d * c)/255; @@ -180,7 +180,7 @@ GDT_InitSmokeRingParticleTexture (void) //b = ((c / 255) * (c2 / 255)) * 512; b = (c * c2) * 512 / (255*255); if (b < 1) b = 0; - d = (noise1[y][x] + noise2[y][x]) / 3; + d = (noise1[y][x] + noise2[y][x]) / 2; if (d > 0) { data[y][x][0] = 255; data[y][x][1] = (d * b)/255;