Try to make lightning beam particles not endlessly spawn without dying while paused.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5910 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
0c41ac0b7d
commit
d6e09af52d
1 changed files with 11 additions and 10 deletions
|
@ -2878,7 +2878,7 @@ void CSQC_GetEntityOrigin(unsigned int csqcent, float *out);
|
|||
CL_UpdateBeams
|
||||
=================
|
||||
*/
|
||||
void CL_UpdateBeams (void)
|
||||
void CL_UpdateBeams (float frametime)
|
||||
{
|
||||
int bnum;
|
||||
int i, j;
|
||||
|
@ -3053,7 +3053,7 @@ void CL_UpdateBeams (void)
|
|||
}
|
||||
|
||||
if (ruleset_allow_particle_lightning.ival || !type->modelname)
|
||||
if (type->ef_beam >= 0 && !P_ParticleTrail(org, b->end, type->ef_beam, host_frametime, b->entity, NULL, &b->trailstate))
|
||||
if (type->ef_beam >= 0 && !P_ParticleTrail(org, b->end, type->ef_beam, frametime, b->entity, NULL, &b->trailstate))
|
||||
continue;
|
||||
if (!type->model)
|
||||
{
|
||||
|
@ -3111,7 +3111,7 @@ void CL_UpdateBeams (void)
|
|||
CL_UpdateExplosions
|
||||
=================
|
||||
*/
|
||||
void CL_UpdateExplosions (void)
|
||||
void CL_UpdateExplosions (float frametime)
|
||||
{
|
||||
int i;
|
||||
float f;
|
||||
|
@ -3122,12 +3122,7 @@ void CL_UpdateExplosions (void)
|
|||
entity_t *ent;
|
||||
int lastrunningexplosion = -1;
|
||||
vec3_t pos, norm;
|
||||
static float oldtime;
|
||||
float scale;
|
||||
float frametime = cl.time - oldtime;
|
||||
if (frametime < 0 || frametime > 100)
|
||||
frametime = 0;
|
||||
oldtime = cl.time;
|
||||
|
||||
for (i=0, ex=cl_explosions; i < explosions_running; i++, ex++)
|
||||
{
|
||||
|
@ -3264,7 +3259,13 @@ CL_UpdateTEnts
|
|||
*/
|
||||
void CL_UpdateTEnts (void)
|
||||
{
|
||||
CL_UpdateBeams ();
|
||||
CL_UpdateExplosions ();
|
||||
static float oldtime;
|
||||
float frametime = cl.time - oldtime;
|
||||
if (frametime < 0 || frametime > 100)
|
||||
frametime = 0;
|
||||
oldtime = cl.time;
|
||||
|
||||
CL_UpdateBeams (frametime);
|
||||
CL_UpdateExplosions (frametime);
|
||||
CL_RunPCustomTEnts ();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue