From 4668a186db552e04b9864f7c104fe1743a1e1311 Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Tue, 19 Nov 2019 14:39:10 +0100 Subject: Reset animation on playback stop --- scene/animation/animation_player.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scene/animation/animation_player.h') diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h index 80ceb70d10..8dfa7aed27 100644 --- a/scene/animation/animation_player.h +++ b/scene/animation/animation_player.h @@ -192,6 +192,7 @@ private: uint64_t accum_pass = 1; float speed_scale = 1.0; double default_blend_time = 0.0; + bool is_stopping = false; struct AnimationData { String name; @@ -277,7 +278,7 @@ private: void _animation_process(double p_delta); void _node_removed(Node *p_node); - void _stop_playing_caches(); + void _stop_playing_caches(bool p_reset); // bind helpers Vector _get_animation_list() const { -- cgit v1.2.3