]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_particles.c
fix the inverted bumps on some surfaces (no longer uses CrossProduct to get the svector)
[xonotic/darkplaces.git] / cl_particles.c
index 447665468d5cde4badc6b64c0f05d66ea7e8a465..1b0d3edd88bbfcea13588c3bde5733471ba812c7 100644 (file)
@@ -603,8 +603,7 @@ void CL_ParseParticleEffect (void)
        vec3_t org, dir;
        int i, count, msgcount, color;
 
-       for (i=0 ; i<3 ; i++)
-               org[i] = MSG_ReadCoord ();
+       MSG_ReadVector(org);
        for (i=0 ; i<3 ; i++)
                dir[i] = MSG_ReadChar () * (1.0/16);
        msgcount = MSG_ReadByte ();
@@ -1105,7 +1104,9 @@ void CL_RocketTrail (vec3_t start, vec3_t end, int type, entity_t *ent)
        // if we skip out, leave it reset
        ent->persistent.trail_time = 0.0f;
 
-       speed = 1.0f / (ent->state_current.time - ent->state_previous.time);
+       speed = ent->state_current.time - ent->state_previous.time;
+       if (speed)
+               speed = 1.0f / speed;
        VectorSubtract(ent->state_current.origin, ent->state_previous.origin, vel);
 #endif
        VectorScale(vel, speed, vel);