From 5d6b58fea69ab78cb04f1f52eed3b2aee0ec9207 Mon Sep 17 00:00:00 2001 From: Josh Grams Date: Wed, 6 Apr 2016 15:06:42 -0400 Subject: AnimationTreePlayer (_process_node): more robust oneshot termination condition. --- scene/animation/animation_tree_player.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scene/animation/animation_tree_player.cpp') diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp index d36960c963..9c2235de78 100644 --- a/scene/animation/animation_tree_player.cpp +++ b/scene/animation/animation_tree_player.cpp @@ -571,8 +571,8 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode if (!p_seek) { osn->time+=p_time; - osn->remaining-=p_time; - if (osn->remaining<0) + osn->remaining=os_rem; + if (osn->remaining<=0) osn->active=false; } -- cgit v1.2.3