TimeScale node: scale return value (time remaining).
(cherry picked from commit 2e1b1234a3
)
This commit is contained in:
parent
656aa0a501
commit
60e4cfbcb7
|
@ -637,10 +637,12 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode
|
||||||
} break;
|
} break;
|
||||||
case NODE_TIMESCALE: {
|
case NODE_TIMESCALE: {
|
||||||
TimeScaleNode *tsn = static_cast<TimeScaleNode*>(nb);
|
TimeScaleNode *tsn = static_cast<TimeScaleNode*>(nb);
|
||||||
|
float rem;
|
||||||
if (p_seek)
|
if (p_seek)
|
||||||
return _process_node(tsn->inputs[0].node,r_prev_anim,p_weight,p_time,switched,true,p_filter,p_reverse_weight);
|
rem = _process_node(tsn->inputs[0].node,r_prev_anim,p_weight,p_time,switched,true,p_filter,p_reverse_weight);
|
||||||
else
|
else
|
||||||
return _process_node(tsn->inputs[0].node,r_prev_anim,p_weight,p_time*tsn->scale,switched,false,p_filter,p_reverse_weight);
|
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;
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
case NODE_TIMESEEK: {
|
case NODE_TIMESEEK: {
|
||||||
|
|
Loading…
Reference in New Issue