summaryrefslogtreecommitdiff
path: root/scene/animation/animation_tree_player.cpp
diff options
context:
space:
mode:
authorJosh Grams <josh@qualdan.com>2016-04-06 15:06:42 -0400
committerJosh Grams <josh@qualdan.com>2016-04-06 15:06:42 -0400
commit5d6b58fea69ab78cb04f1f52eed3b2aee0ec9207 (patch)
treeafca06e6334c58f0622a6338af971a57138e2513 /scene/animation/animation_tree_player.cpp
parent0a9c8a9f36dbcba2e416b7ab29c949b70bd72c0e (diff)
AnimationTreePlayer (_process_node): more robust oneshot termination condition.
Diffstat (limited to 'scene/animation/animation_tree_player.cpp')
-rw-r--r--scene/animation/animation_tree_player.cpp4
1 files changed, 2 insertions, 2 deletions
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;
}