From b897f96e51bf7b5804fc0ad26b68763a5c393bd9 Mon Sep 17 00:00:00 2001 From: Ragnvald Maartmann-Moe IV Date: Fri, 6 Apr 2001 19:23:00 +0000 Subject: [PATCH] Restore old grenade smoke trail, make order of texture generator mentions consistent. --- qw/source/gl_dyn_part.c | 23 +++++++++++++---------- qw/source/gl_dyn_textures.c | 4 ++-- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/qw/source/gl_dyn_part.c b/qw/source/gl_dyn_part.c index 24e0df5a5..7845ec40a 100644 --- a/qw/source/gl_dyn_part.c +++ b/qw/source/gl_dyn_part.c @@ -81,10 +81,10 @@ extern qboolean lighthalf; extern cvar_t *cl_max_particles; -extern int part_tex_smoke_ring[8]; -extern int part_tex_smoke[8]; extern int part_tex_dot; extern int part_tex_spark; +extern int part_tex_smoke[8]; +extern int part_tex_smoke_ring[8]; int ramp[8] = { 0x6d, 0x6b, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01 }; @@ -490,12 +490,6 @@ R_RocketTrail (int type, entity_t *ent) switch (type) { case 0: // rocket trail pcolor = (rand () & 3) + 12; - goto common_rocket_gren_trail; - case 1: // grenade trail - pcolor = (rand () & 3) + 3; - goto common_rocket_gren_trail; - - common_rocket_gren_trail: len -= 4; ptex = part_tex_smoke_ring[rand () & 7]; pscale = lhrandom (10, 15); @@ -505,13 +499,22 @@ R_RocketTrail (int type, entity_t *ent) VectorVectors(vec, right, up); VectorCopy (ent->old_origin, porg); break; + case 1: // grenade trail + pcolor = (rand () & 3) + 3; + len -= 4; + ptex = part_tex_smoke[rand () & 7]; + pscale = lhrandom (10, 15); + palpha = 48 + (rand () & 31); + ptype = pt_smoke; + pdie = cl.time + 1; + VectorVectors(vec, right, up); + VectorCopy (ent->old_origin, porg); + break; case 4: // slight blood len -= 4; case 2: // blood len -= 4; - ptex = part_tex_dot; pcolor = 68 + (rand () & 3); - pdie = cl.time + 2; for (j = 0; j < 3; j++) { pvel[j] = (rand () & 15) - 8; porg[j] = ent->old_origin[j] + ((rand () % 3) - 2); diff --git a/qw/source/gl_dyn_textures.c b/qw/source/gl_dyn_textures.c index 9edfdcb5d..5ee5f4af5 100644 --- a/qw/source/gl_dyn_textures.c +++ b/qw/source/gl_dyn_textures.c @@ -42,10 +42,10 @@ static void GDT_InitSparkParticleTexture (void); static void GDT_InitSmokeParticleTexture (void); static void GDT_InitSmokeRingParticleTexture (void); -int part_tex_smoke_ring[8]; -int part_tex_smoke[8]; int part_tex_dot; int part_tex_spark; +int part_tex_smoke[8]; +int part_tex_smoke_ring[8]; void GDT_Init (void)