mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
Future-proof particles by resetting them completely when replaced.
This commit is contained in:
parent
1047b766df
commit
f044695d28
1 changed files with 5 additions and 0 deletions
|
@ -130,6 +130,11 @@ inline particle_t *NewParticle (FLevelLocals *Level, bool replace = false)
|
|||
particle_t* ntop = &Level->Particles[result->tnext];
|
||||
ntop->tprev = Level->ActiveParticles;
|
||||
}
|
||||
auto tnext = result->tnext;
|
||||
auto tprev = result->tprev;
|
||||
memset(result, 0, sizeof(particle_t));
|
||||
result->tnext = tnext;
|
||||
result->tprev = tprev;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue