Fix software scrag missile trails, and add a minor optimization to them and hell knight's fire wave trails.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2002-01-06 23:12:09 +00:00
parent 097ff0006f
commit f8daa09bcb
2 changed files with 26 additions and 12 deletions

View file

@ -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);
}

View file

@ -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);
}