mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 12:12:28 +00:00
Disable particle trails particles when parent parent is not active.
This commit is contained in:
parent
b04bc49443
commit
eb10c71d6c
@ -304,6 +304,11 @@ void main() {
|
|||||||
PARTICLE.flags = PARTICLE_FLAG_ACTIVE | (particles.data[src_idx].flags & (PARTICLE_FRAME_MASK << PARTICLE_FRAME_SHIFT));
|
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.
|
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 {
|
} else {
|
||||||
PARTICLE.flags &= ~PARTICLE_FLAG_STARTED;
|
PARTICLE.flags &= ~PARTICLE_FLAG_STARTED;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user