summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJosh Grams <josh@qualdan.com>2016-03-08 07:16:25 -0500
committerJosh Grams <josh@qualdan.com>2016-03-09 06:57:28 -0500
commit65b7791263e8e20f83b6b7fbfd30329a0e4e9a4f (patch)
treeb551fd1c4de7854642774d73d0f6a7d7cb71e045 /scene
parent2e1b1234a339e5aa651b6462fe03461c65c98bc4 (diff)
TimeScale node: return +inf remaining for 0 scale.
Diffstat (limited to 'scene')
-rw-r--r--scene/animation/animation_tree_player.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp
index 67c7eae1bf..6d45135ca2 100644
--- a/scene/animation/animation_tree_player.cpp
+++ b/scene/animation/animation_tree_player.cpp
@@ -642,7 +642,10 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode
rem = _process_node(tsn->inputs[0].node,r_prev_anim,p_weight,p_time,switched,true,p_filter,p_reverse_weight);
else
rem = _process_node(tsn->inputs[0].node,r_prev_anim,p_weight,p_time*tsn->scale,switched,false,p_filter,p_reverse_weight);
- return rem / tsn->scale;
+ if (tsn->scale == 0)
+ return INFINITY;
+ else
+ return rem / tsn->scale;
} break;
case NODE_TIMESEEK: {