Merge pull request #70422 from clayjohn/RD-trails

Disable particle trails particles when parent parent is not active.
This commit is contained in:
Rémi Verschelde 2022-12-21 23:38:04 +01:00
commit 291add339f
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 5 additions and 0 deletions

View File

@ -304,6 +304,11 @@ void main() {
PARTICLE.flags = PARTICLE_FLAG_ACTIVE | (particles.data[src_idx].flags & (PARTICLE_FRAME_MASK << PARTICLE_FRAME_SHIFT));
return; //- this appears like it should be correct, but it seems not to be.. wonder why.
}
if (!bool(particles.data[src_idx].flags & PARTICLE_FLAG_ACTIVE)) {
// Disable the entire trail if the parent is no longer active.
PARTICLE.flags = 0;
return;
}
} else {
PARTICLE.flags &= ~PARTICLE_FLAG_STARTED;
}