start location to their new location on the first frame
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7226
d7cf8633-e32d-0410-b094-
e92efae38249
// do trails
if (e->render.flags & RENDER_GLOWTRAIL)
trailtype = EFFECT_TR_GLOWTRAIL;
- if (trailtype)
+ // be sure to check for changes in e->state_previous.active and
+ // modelindex so that entities which did not exist in the previous
+ // frame don't create a trail from the start location
+ if (trailtype && e->state_previous.active && e->state_previous.modelindex == e->state_current.modelindex)
{
float len;
vec3_t vel;
ent->render.framelerp = 1;
// reset various persistent stuff
ent->persistent.muzzleflash = 0;
- VectorCopy(ent->state_current.origin, ent->persistent.trail_origin);
}
else if (DotProduct(odelta, odelta) > 1000*1000 || (cl.fixangle[0] && !cl.fixangle[1]))
{