diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-11-07 15:05:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-07 15:05:55 +0100 |
commit | e2b39bfdc4eda03958ab7506bb59c701c3a3b677 (patch) | |
tree | 2c4070b27a4ec6988c9d6317dfad12ff82f044e6 /servers | |
parent | fc1c25d29d8c59c740304326d172cbf3285fe37c (diff) | |
parent | ab7a807f2bfffa270ad0438eb646139db860537b (diff) |
Merge pull request #68346 from Calinou/particles-rename-trail-length-property
Rename GPUParticles2D/3D's `trail_length_secs` to `trail_lifetime`
Diffstat (limited to 'servers')
-rw-r--r-- | servers/rendering/renderer_rd/storage_rd/particles_storage.cpp | 4 | ||||
-rw-r--r-- | servers/rendering/renderer_rd/storage_rd/particles_storage.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp b/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp index 7fa0bb64a3..854976692e 100644 --- a/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp @@ -425,7 +425,7 @@ void ParticlesStorage::particles_set_trails(RID p_particles, bool p_enable, doub p_length = MIN(10.0, p_length); particles->trails_enabled = p_enable; - particles->trail_length = p_length; + particles->trail_lifetime = p_length; _particles_free_data(particles); @@ -1351,7 +1351,7 @@ void ParticlesStorage::update_particles() { int history_size = 1; int trail_steps = 1; if (particles->trails_enabled && particles->trail_bind_poses.size() > 1) { - history_size = MAX(1, int(particles->trail_length * fixed_fps)); + history_size = MAX(1, int(particles->trail_lifetime * fixed_fps)); trail_steps = particles->trail_bind_poses.size(); } diff --git a/servers/rendering/renderer_rd/storage_rd/particles_storage.h b/servers/rendering/renderer_rd/storage_rd/particles_storage.h index 017844626f..6478e2b5dc 100644 --- a/servers/rendering/renderer_rd/storage_rd/particles_storage.h +++ b/servers/rendering/renderer_rd/storage_rd/particles_storage.h @@ -232,7 +232,7 @@ private: Dependency dependency; - double trail_length = 1.0; + double trail_lifetime = 0.3; bool trails_enabled = false; LocalVector<ParticlesFrameParams> frame_history; LocalVector<ParticlesFrameParams> trail_params; |