summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-03-13 11:51:30 +0100
committerGitHub <noreply@github.com>2018-03-13 11:51:30 +0100
commitb49746f3cd3aeead93f795ed4b08122c46faa413 (patch)
tree3df0e498e891abf6f4125dbac1ca35ad52236024
parent4287c7822b8aa06b069e42b44b9aa73396db62f5 (diff)
parentb553b38e7be52003f44bb05165fdae25c5863ab7 (diff)
Merge pull request #17381 from poke1024/fix-anim-scrub
AnimationPlayer: fix scrubbing after play backwards
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp1
-rw-r--r--scene/animation/animation_player.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index c22e1cd88b..04c9246aed 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -1011,6 +1011,7 @@ void AnimationPlayerEditor::_seek_value_changed(float p_value, bool p_set) {
player->seek_delta(pos, pos - cpos);
} else {
+ player->stop(true);
player->seek(pos, true);
}
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 9db4a5fb04..04e7d5cc10 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -1010,6 +1010,7 @@ void AnimationPlayer::stop(bool p_reset) {
c.blend.clear();
if (p_reset) {
c.current.from = NULL;
+ c.current.speed_scale = 1;
}
_set_process(false);
queued.clear();