diff options
| author | Rémi Verschelde | 2017-05-16 16:34:37 +0200 |
|---|---|---|
| committer | GitHub | 2017-05-16 16:34:37 +0200 |
| commit | d801ff2b3db2de105c1b36a74ce116e360143d4e (patch) | |
| tree | 4afa738bb33a41ad6bb4ef480732f94199fb8217 | |
| parent | ce2077262a967cd9020d54059a03a11f33d15c01 (diff) | |
| parent | 73385e362baf302fd044029072083e32b2e89d75 (diff) | |
| download | godot-d801ff2b3db2de105c1b36a74ce116e360143d4e.tar.gz godot-d801ff2b3db2de105c1b36a74ce116e360143d4e.tar.zst godot-d801ff2b3db2de105c1b36a74ce116e360143d4e.zip | |
| -rw-r--r-- | scene/3d/particles.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp index 038ca33a4..71079ea78 100644 --- a/scene/3d/particles.cpp +++ b/scene/3d/particles.cpp @@ -48,11 +48,13 @@ void Particles::set_emitting(bool p_emitting) { void Particles::set_amount(int p_amount) { + ERR_FAIL_COND(p_amount < 1); amount = p_amount; VS::get_singleton()->particles_set_amount(particles, amount); } void Particles::set_lifetime(float p_lifetime) { + ERR_FAIL_COND(p_lifetime <= 0); lifetime = p_lifetime; VS::get_singleton()->particles_set_lifetime(particles, lifetime); } |
