diff --git a/libs/video/renderer/sw/sw_rpart.c b/libs/video/renderer/sw/sw_rpart.c index af9f11a77..40b01707e 100644 --- a/libs/video/renderer/sw/sw_rpart.c +++ b/libs/video/renderer/sw/sw_rpart.c @@ -539,14 +539,22 @@ R_WizTrail_QF (entity_t *ent) p->next = active_particles; active_particles = p; - VectorCopy (vec3_origin, p->vel); - p->die = r_realtime + 0.5; p->type = pt_static; p->color = 52 + ((tracercount & 4) << 1); tracercount++; + VectorCopy (ent->old_origin, p->org); + if (tracercount & 1) { + p->vel[0] = 30.0 * vec[1]; + p->vel[1] = 30.0 * -vec[0]; + } else { + p->vel[0] = 30.0 * -vec[1]; + p->vel[1] = 30.0 * vec[0]; + } + p->vel[2] = 0.0; + VectorAdd (ent->old_origin, vec, ent->old_origin); } } @@ -576,8 +584,6 @@ R_FlameTrail_QF (entity_t *ent) p->next = active_particles; active_particles = p; - VectorCopy (vec3_origin, p->vel); - p->die = r_realtime + 0.5; p->type = pt_static; p->color = 230 + ((tracercount & 4) << 1); @@ -592,6 +598,7 @@ R_FlameTrail_QF (entity_t *ent) p->vel[0] = 30 * -vec[1]; p->vel[1] = 30 * vec[0]; } + p->vel[2] = 0.0; VectorAdd (ent->old_origin, vec, ent->old_origin); } diff --git a/libs/video/renderer/sw32/sw32_rpart.c b/libs/video/renderer/sw32/sw32_rpart.c index e5af5c177..91609c648 100644 --- a/libs/video/renderer/sw32/sw32_rpart.c +++ b/libs/video/renderer/sw32/sw32_rpart.c @@ -539,14 +539,22 @@ R_WizTrail_QF (entity_t *ent) p->next = active_particles; active_particles = p; - VectorCopy (vec3_origin, p->vel); - p->die = r_realtime + 0.5; p->type = pt_static; p->color = 52 + ((tracercount & 4) << 1); tracercount++; + VectorCopy (ent->old_origin, p->org); + if (tracercount & 1) { + p->vel[0] = 30.0 * vec[1]; + p->vel[1] = 30.0 * -vec[0]; + } else { + p->vel[0] = 30.0 * -vec[1]; + p->vel[1] = 30.0 * vec[0]; + } + p->vel[2] = 0.0; + VectorAdd (ent->old_origin, vec, ent->old_origin); } } @@ -576,8 +584,6 @@ R_FlameTrail_QF (entity_t *ent) p->next = active_particles; active_particles = p; - VectorCopy (vec3_origin, p->vel); - p->die = r_realtime + 0.5; p->type = pt_static; p->color = 230 + ((tracercount & 4) << 1); @@ -586,12 +592,13 @@ R_FlameTrail_QF (entity_t *ent) VectorCopy (ent->old_origin, p->org); if (tracercount & 1) { - p->vel[0] = 30 * vec[1]; - p->vel[1] = 30 * -vec[0]; + p->vel[0] = 30.0 * vec[1]; + p->vel[1] = 30.0 * -vec[0]; } else { - p->vel[0] = 30 * -vec[1]; - p->vel[1] = 30 * vec[0]; + p->vel[0] = 30.0 * -vec[1]; + p->vel[1] = 30.0 * vec[0]; } + p->vel[2] = 0.0; VectorAdd (ent->old_origin, vec, ent->old_origin); }