diff options
Diffstat (limited to 'scene/3d/particles.cpp')
-rw-r--r-- | scene/3d/particles.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp index b445ccc5a9..fda4647141 100644 --- a/scene/3d/particles.cpp +++ b/scene/3d/particles.cpp @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ +/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -42,8 +42,7 @@ PoolVector<Face3> Particles::get_faces(uint32_t p_usage_flags) const { void Particles::set_emitting(bool p_emitting) { - emitting = p_emitting; - VS::get_singleton()->particles_set_emitting(particles, emitting); + VS::get_singleton()->particles_set_emitting(particles, p_emitting); } void Particles::set_amount(int p_amount) { @@ -63,7 +62,7 @@ void Particles::set_one_shot(bool p_one_shot) { one_shot = p_one_shot; VS::get_singleton()->particles_set_one_shot(particles, one_shot); - if (!one_shot && emitting) + if (!one_shot && is_emitting()) VisualServer::get_singleton()->particles_restart(particles); } @@ -113,7 +112,7 @@ void Particles::set_speed_scale(float p_scale) { bool Particles::is_emitting() const { - return emitting; + return VS::get_singleton()->particles_get_emitting(particles); } int Particles::get_amount() const { |