summaryrefslogtreecommitdiffstats
path: root/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2022-11-06 21:57:08 +0100
committerHugo Locurcio <hugo.locurcio@hugo.pro>2022-11-07 13:37:40 +0100
commitab7a807f2bfffa270ad0438eb646139db860537b (patch)
treed37da6b3809cdc2444f243383fb824d60f4bd23e /servers/rendering/renderer_rd/storage_rd/particles_storage.cpp
parentf814e15c7f60a685e8b3623fc93231c18ccd3627 (diff)
downloadredot-engine-ab7a807f2bfffa270ad0438eb646139db860537b.tar.gz
Rename GPUParticles2D/3D's `trail_length_secs` to `trail_lifetime`
The property already has a "seconds" suffix in the inspector. The "lifetime" term makes it more obvious that the property is specified as time, not a distance in units. The property hint now allows manually entering values greater than 10 seconds. The internal rendering value's default now matches the particles nodes' default.
Diffstat (limited to 'servers/rendering/renderer_rd/storage_rd/particles_storage.cpp')
-rw-r--r--servers/rendering/renderer_rd/storage_rd/particles_storage.cpp4
1 files changed, 2 insertions, 2 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();
}