summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-05-05 16:43:54 +0200
committerGitHub <noreply@github.com>2020-05-05 16:43:54 +0200
commit88e242116ad986734b31ec88a3fed3d1c0bbcf1a (patch)
treee10a674635f86f3848bcfbe262680b0881ea5eaa
parent192529c2d0ffe50c8c37b11e87c46c5c2d9e97e3 (diff)
parent281126823172b02c78e8a85c638b57b8b62c2963 (diff)
Merge pull request #38480 from ThakeeNathees/tween-get-set-fix
Fix: Tween always return true for _get(), _set()
-rw-r--r--scene/animation/tween.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp
index bc28c38e2c..d0c6cac8cf 100644
--- a/scene/animation/tween.cpp
+++ b/scene/animation/tween.cpp
@@ -126,14 +126,17 @@ bool Tween::_set(const StringName &p_name, const Variant &p_value) {
String name = p_name;
if (name == "playback/speed" || name == "speed") { // Backwards compatibility
set_speed_scale(p_value);
+ return true;
} else if (name == "playback/active") {
set_active(p_value);
+ return true;
} else if (name == "playback/repeat") {
set_repeat(p_value);
+ return true;
}
- return true;
+ return false;
}
bool Tween::_get(const StringName &p_name, Variant &r_ret) const {
@@ -142,14 +145,17 @@ bool Tween::_get(const StringName &p_name, Variant &r_ret) const {
String name = p_name;
if (name == "playback/speed") { // Backwards compatibility
r_ret = speed_scale;
+ return true;
} else if (name == "playback/active") {
r_ret = is_active();
+ return true;
} else if (name == "playback/repeat") {
r_ret = is_repeat();
+ return true;
}
- return true;
+ return false;
}
void Tween::_get_property_list(List<PropertyInfo> *p_list) const {