diff options
author | Josh Grams <josh@qualdan.com> | 2016-03-31 10:06:38 -0400 |
---|---|---|
committer | Josh Grams <josh@qualdan.com> | 2016-03-31 10:06:38 -0400 |
commit | 7fe28d4168aa52a79cbc41c42112c1d1ec2680f4 (patch) | |
tree | be9ba83e7cce30a079eb09d4f96b06d2bc12cca7 /scene/animation | |
parent | 8920ab0fbfd31098b97894d27db5704072c5cd2b (diff) |
AnimationTreePlayer (_process_node:TIMESEEK): give p_seek precedence over tsn->seek_pos.
Diffstat (limited to 'scene/animation')
-rw-r--r-- | scene/animation/animation_tree_player.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp index 050d6070a5..1a3fbe3ef1 100644 --- a/scene/animation/animation_tree_player.cpp +++ b/scene/animation/animation_tree_player.cpp @@ -652,14 +652,14 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode case NODE_TIMESEEK: { TimeSeekNode *tsn = static_cast<TimeSeekNode*>(nb); - if (tsn->seek_pos>=0) { + if (tsn->seek_pos>=0 && !p_seek) { - float res = _process_node(tsn->inputs[0].node,r_prev_anim,p_weight,tsn->seek_pos,true,p_filter,p_reverse_weight); - tsn->seek_pos=-1; - return res; + p_time = tsn->seek_pos; + p_seek = true; + } + tsn->seek_pos=-1; - } else - return _process_node(tsn->inputs[0].node,r_prev_anim,p_weight,p_time,p_seek); + return _process_node(tsn->inputs[0].node,r_prev_anim,p_weight,p_time,p_seek); } break; case NODE_TRANSITION: { |