You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
Merge pull request #107915 from QbieShay/fix_emitting_reset
Fix particles resetting properties when emitting is toggled
This commit is contained in:
@@ -45,7 +45,7 @@ void CPUParticles2D::set_emitting(bool p_emitting) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_emitting && !use_fixed_seed) {
|
if (p_emitting && !use_fixed_seed && one_shot) {
|
||||||
set_seed(Math::rand());
|
set_seed(Math::rand());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
void GPUParticles2D::set_emitting(bool p_emitting) {
|
void GPUParticles2D::set_emitting(bool p_emitting) {
|
||||||
// Do not return even if `p_emitting == emitting` because `emitting` is just an approximation.
|
// Do not return even if `p_emitting == emitting` because `emitting` is just an approximation.
|
||||||
|
|
||||||
if (p_emitting && p_emitting != emitting && !use_fixed_seed) {
|
if (p_emitting && p_emitting != emitting && !use_fixed_seed && one_shot) {
|
||||||
set_seed(Math::rand());
|
set_seed(Math::rand());
|
||||||
}
|
}
|
||||||
if (p_emitting && one_shot) {
|
if (p_emitting && one_shot) {
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ void CPUParticles3D::set_emitting(bool p_emitting) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_emitting && !use_fixed_seed) {
|
if (p_emitting && !use_fixed_seed && one_shot) {
|
||||||
set_seed(Math::rand());
|
set_seed(Math::rand());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ AABB GPUParticles3D::get_aabb() const {
|
|||||||
|
|
||||||
void GPUParticles3D::set_emitting(bool p_emitting) {
|
void GPUParticles3D::set_emitting(bool p_emitting) {
|
||||||
// Do not return even if `p_emitting == emitting` because `emitting` is just an approximation.
|
// Do not return even if `p_emitting == emitting` because `emitting` is just an approximation.
|
||||||
if (p_emitting && p_emitting != emitting && !use_fixed_seed) {
|
if (p_emitting && p_emitting != emitting && !use_fixed_seed && one_shot) {
|
||||||
set_seed(Math::rand());
|
set_seed(Math::rand());
|
||||||
}
|
}
|
||||||
if (p_emitting && one_shot) {
|
if (p_emitting && one_shot) {
|
||||||
|
|||||||
Reference in New Issue
Block a user