attempted fix to particle run list
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2377 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
0939c0e46c
commit
36eb3f13ad
1 changed files with 6 additions and 4 deletions
|
@ -3936,7 +3936,7 @@ void DrawParticleTypes (void (*texturedparticles)(particle_t *,part_type_t*), vo
|
||||||
|
|
||||||
vec3_t oldorg;
|
vec3_t oldorg;
|
||||||
vec3_t stop, normal;
|
vec3_t stop, normal;
|
||||||
part_type_t *type, *prevtype;
|
part_type_t *type, *lastvalidtype;
|
||||||
particle_t *p, *kill;
|
particle_t *p, *kill;
|
||||||
clippeddecal_t *d;
|
clippeddecal_t *d;
|
||||||
ramp_t *ramp;
|
ramp_t *ramp;
|
||||||
|
@ -4006,7 +4006,7 @@ void DrawParticleTypes (void (*texturedparticles)(particle_t *,part_type_t*), vo
|
||||||
sparklineparticles = NULL;
|
sparklineparticles = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (type = part_run_list, prevtype = NULL; type != NULL; prevtype = type, type = type->nexttorun)
|
for (type = part_run_list, lastvalidtype = NULL; type != NULL; type = type->nexttorun)
|
||||||
{
|
{
|
||||||
if (type->clippeddecals)
|
if (type->clippeddecals)
|
||||||
{
|
{
|
||||||
|
@ -4447,12 +4447,14 @@ void DrawParticleTypes (void (*texturedparticles)(particle_t *,part_type_t*), vo
|
||||||
// delete from run list if necessary
|
// delete from run list if necessary
|
||||||
if (!type->particles && !type->beams)
|
if (!type->particles && !type->beams)
|
||||||
{
|
{
|
||||||
if (part_run_list == type)
|
if (!lastvalidtype)
|
||||||
part_run_list = type->nexttorun;
|
part_run_list = type->nexttorun;
|
||||||
else
|
else
|
||||||
prevtype->nexttorun = type->nexttorun;
|
lastvalidtype->nexttorun = type->nexttorun;
|
||||||
type->state &= ~PS_INRUNLIST;
|
type->state &= ~PS_INRUNLIST;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
lastvalidtype = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
RSpeedEnd(RSPEED_PARTICLES);
|
RSpeedEnd(RSPEED_PARTICLES);
|
||||||
|
|
Loading…
Reference in a new issue