From e0277b5405e0e328b6ee4c83b38dc39f77541c17 Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 3 Aug 2002 20:41:12 +0000 Subject: [PATCH] rearranged things a little, mostly related to particles created by EntityParticles, which should only live one frame git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2177 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_particles.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cl_particles.c b/cl_particles.c index b2e25248..0b195d60 100644 --- a/cl_particles.c +++ b/cl_particles.c @@ -261,7 +261,7 @@ void CL_EntityParticles (entity_t *ent) forward[1] = cp*sy; forward[2] = -sp; - particle(pt_static, PARTICLE_BILLBOARD, particlepalette[0x6f], particlepalette[0x6f], tex_particle, false, false, 2, 2, 255, 0, -19999, 0, 0, ent->render.origin[0] + m_bytenormals[i][0]*dist + forward[0]*beamlength, ent->render.origin[1] + m_bytenormals[i][1]*dist + forward[1]*beamlength, ent->render.origin[2] + m_bytenormals[i][2]*dist + forward[2]*beamlength, 0, 0, 0, 0, 0, 0, 0, 0, 0); + particle(pt_static, PARTICLE_BILLBOARD, particlepalette[0x6f], particlepalette[0x6f], tex_particle, false, false, 2, 2, 255, 0, 0, 0, 0, ent->render.origin[0] + m_bytenormals[i][0]*dist + forward[0]*beamlength, ent->render.origin[1] + m_bytenormals[i][1]*dist + forward[1]*beamlength, ent->render.origin[2] + m_bytenormals[i][2]*dist + forward[2]*beamlength, 0, 0, 0, 0, 0, 0, 0, 0, 0); } } @@ -877,6 +877,7 @@ void CL_MoveParticles (void) } } p->vel[2] -= p->gravity * gravity; + p->alpha -= p->alphafade * frametime; if (p->friction) { f = p->friction * frametime; @@ -940,7 +941,6 @@ void CL_MoveParticles (void) p->die = -1; break; } - p->alpha -= p->alphafade * frametime; // remove dead particles if (p->alpha < 1 || p->die < cl.time) -- 2.39.2