]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Merged CL_RocketTrail2 into CL_RocketTrail.
authortomaz <tomaz@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 12 Sep 2004 17:04:31 +0000 (17:04 +0000)
committertomaz <tomaz@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 12 Sep 2004 17:04:31 +0000 (17:04 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4489 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c
cl_particles.c
client.h

index a1e7c95f75eeb3c50773fa6c0844dfa770db4fd8..86a7e89565637dd7dfc2af8cbae88c49d8906c4b 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -837,9 +837,9 @@ void CL_LinkNetworkEntity(entity_t *e)
                if (e->state_previous.active && e->state_previous.modelindex == e->state_current.modelindex)
                {
                        if (e->render.flags & RENDER_GLOWTRAIL)
-                               CL_RocketTrail2(e->persistent.trail_origin, origin, e->state_current.glowcolor, e);
-                       else if (trailtype >= 0)
-                               CL_RocketTrail(e->persistent.trail_origin, origin, trailtype, e);
+                               trailtype = 9;
+                       if (trailtype >= 0)
+                               CL_RocketTrail(e->persistent.trail_origin, origin, trailtype, e->state_current.glowcolor, e);
                }
                VectorCopy(origin, e->persistent.trail_origin);
                // note: the cl.viewentity and intermission check is to hide player
index a07ecbdad9ae16e1f800465725abefe2397996ab..11ec5230b841c968a317630cced37c3231eec736 100644 (file)
@@ -40,7 +40,6 @@ void R_Stain (vec3_t origin, float radius, int cr1, int cg1, int cb1, int ca1, i
 #define CL_BlobExplosion R_BlobExplosion
 #define CL_RunParticleEffect R_RunParticleEffect
 #define CL_LavaSplash R_LavaSplash
-#define CL_RocketTrail2 R_RocketTrail2
 void R_CalcBeam_Vertex3f (float *vert, vec3_t org1, vec3_t org2, float width)
 {
        vec3_t right1, right2, diff, normal;
@@ -1092,7 +1091,7 @@ void R_TeleportSplash (vec3_t org)
 #ifdef WORKINGLQUAKE
 void R_RocketTrail (vec3_t start, vec3_t end, int type)
 #else
-void CL_RocketTrail (vec3_t start, vec3_t end, int type, entity_t *ent)
+void CL_RocketTrail (vec3_t start, vec3_t end, int type, int color, entity_t *ent)
 #endif
 {
        vec3_t vec, dir, vel, pos;
@@ -1200,7 +1199,7 @@ void CL_RocketTrail (vec3_t start, vec3_t end, int type, entity_t *ent)
                                                particle(pt_static, PARTICLE_BILLBOARD, 0x502030, 0x502030, tex_particle, false, PBLEND_ADD, 6, 6, qd*128, qd*384, 9999, 0, 0, pos[0], pos[1], pos[2], lhrandom(-8, 8), lhrandom(-8, 8), lhrandom(-8, 8), 0, 0, 0, 0, 0, 0);
                                }
                                break;
-
+#ifndef WORKINGLQUAKE
                        case 7: // Nehahra smoke tracer
                                dec = qd*7;
                                if (smoke)
@@ -1211,6 +1210,12 @@ void CL_RocketTrail (vec3_t start, vec3_t end, int type, entity_t *ent)
                                if (smoke)
                                        particle(pt_static, PARTICLE_BILLBOARD, 0x283880, 0x283880, tex_particle, false, PBLEND_ADD, 4, 4, qd*255, qd*1024, 9999, 0, 0, pos[0], pos[1], pos[2], 0, 0, 0, 0, 0, 0, 0, 0, 0);
                                break;
+                       case 9: // glow trail
+                               dec = qd*3;
+                               if (smoke)
+                                       particle(pt_static, PARTICLE_BILLBOARD, color, color, tex_particle, false, PBLEND_ALPHA, 5, 5, qd*128, qd*320, 9999, 0, 0, pos[0], pos[1], pos[2], 0, 0, 0, 0, 0, 0, 0, 0, 0);
+                               break;
+#endif
                }
 
                // advance to next time and position
@@ -1222,30 +1227,6 @@ void CL_RocketTrail (vec3_t start, vec3_t end, int type, entity_t *ent)
 #endif
 }
 
-void CL_RocketTrail2 (vec3_t start, vec3_t end, int color, entity_t *ent)
-{
-       float dec, len;
-       vec3_t vec, pos;
-       if (!cl_particles.integer) return;
-       if (!cl_particles_smoke.integer) return;
-
-       VectorCopy(start, pos);
-       VectorSubtract(end, start, vec);
-#ifdef WORKINGLQUAKE
-       len = VectorNormalize(vec);
-#else
-       len = VectorNormalizeLength(vec);
-#endif
-       color = particlepalette[color];
-       dec = 3.0f / cl_particles_quality.value;
-       while (len > 0)
-       {
-               particle(pt_static, PARTICLE_BILLBOARD, color, color, tex_particle, false, PBLEND_ALPHA, 5, 5, 128 / cl_particles_quality.value, 320 / cl_particles_quality.value, 9999, 0, 0, pos[0], pos[1], pos[2], 0, 0, 0, 0, 0, 0, 0, 0, 0);
-               len -= dec;
-               VectorMA(pos, dec, vec, pos);
-       }
-}
-
 void CL_BeamParticle (const vec3_t start, const vec3_t end, vec_t radius, float red, float green, float blue, float alpha, float lifetime)
 {
        int tempcolor2, cr, cg, cb;
index 14148b1e8c1f8c43c7db71ce68807345500e9bb0..55af9a9abb523c8c26ffc42d876d341b85af4f34 100644 (file)
--- a/client.h
+++ b/client.h
@@ -718,8 +718,7 @@ void CL_Particles_Init(void);
 
 void CL_ParseParticleEffect (void);
 void CL_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count);
-void CL_RocketTrail (vec3_t start, vec3_t end, int type, entity_t *ent);
-void CL_RocketTrail2 (vec3_t start, vec3_t end, int color, entity_t *ent);
+void CL_RocketTrail (vec3_t start, vec3_t end, int type, int color, entity_t *ent);
 void CL_SparkShower (vec3_t org, vec3_t dir, int count);
 void CL_PlasmaBurn (vec3_t org);
 void CL_BloodPuff (vec3_t org, vec3_t vel, int count);