You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
fix gpu_particles_3d randomizing seed when set_one_shot is called
This commit is contained in:
@@ -912,6 +912,8 @@ GPUParticles2D::GPUParticles2D() {
|
||||
one_shot = false; // Needed so that set_emitting doesn't access uninitialized values
|
||||
set_emitting(true);
|
||||
set_one_shot(false);
|
||||
set_use_fixed_seed(false);
|
||||
set_seed(0);
|
||||
set_amount(8);
|
||||
set_amount_ratio(1.0);
|
||||
set_lifetime(1);
|
||||
|
||||
@@ -92,10 +92,6 @@ void GPUParticles3D::set_one_shot(bool p_one_shot) {
|
||||
|
||||
if (is_emitting()) {
|
||||
if (!one_shot) {
|
||||
if (!use_fixed_seed) {
|
||||
set_seed(Math::rand());
|
||||
}
|
||||
|
||||
RenderingServer::get_singleton()->particles_restart(particles);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user