diff options
| author | Max Hilbrunner | 2018-05-25 16:17:55 +0200 |
|---|---|---|
| committer | GitHub | 2018-05-25 16:17:55 +0200 |
| commit | 47cfdfe2ee14418439afaf08644a194e8cf4193a (patch) | |
| tree | 7d57ee7ba7373b287c65df3d3c7ae00dc0622383 | |
| parent | c7ccb8abe1362a388b5f04c2c1aaad0f8b3115e3 (diff) | |
| parent | c518b96362f5a92a31b9b993f6f31cff3d397d2d (diff) | |
| download | godot-47cfdfe2ee14418439afaf08644a194e8cf4193a.tar.gz godot-47cfdfe2ee14418439afaf08644a194e8cf4193a.tar.zst godot-47cfdfe2ee14418439afaf08644a194e8cf4193a.zip | |
| -rw-r--r-- | scene/animation/tween.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp index 49013b160..4eefcc9ce 100644 --- a/scene/animation/tween.cpp +++ b/scene/animation/tween.cpp @@ -886,6 +886,10 @@ real_t Tween::tell() const { real_t Tween::get_runtime() const { + if (speed_scale == 0) { + return INFINITY; + } + pending_update++; real_t runtime = 0; for (const List<InterpolateData>::Element *E = interpolates.front(); E; E = E->next()) { @@ -896,7 +900,8 @@ real_t Tween::get_runtime() const { runtime = t; } pending_update--; - return runtime; + + return runtime / speed_scale; } bool Tween::_calc_delta_val(const Variant &p_initial_val, const Variant &p_final_val, Variant &p_delta_val) { |
