Merge pull request #89042 from permelin/fix-particle-trail-activation
Fix early activation of particle trail sections
This commit is contained in:
commit
cebaf9dac5
1 changed files with 5 additions and 0 deletions
|
@ -1452,6 +1452,11 @@ void ParticlesStorage::update_particles() {
|
|||
if (uint32_t(history_size) != particles->frame_history.size()) {
|
||||
particles->frame_history.resize(history_size);
|
||||
memset(particles->frame_history.ptr(), 0, sizeof(ParticlesFrameParams) * history_size);
|
||||
// Set the frame number so that we are able to distinguish an uninitialized
|
||||
// frame from the true frame number zero. See issue #88712 for details.
|
||||
for (int i = 0; i < history_size; i++) {
|
||||
particles->frame_history[i].frame = UINT32_MAX;
|
||||
}
|
||||
}
|
||||
|
||||
if (uint32_t(trail_steps) != particles->trail_params.size() || particles->frame_params_buffer.is_null()) {
|
||||
|
|
Loading…
Reference in a new issue