summaryrefslogtreecommitdiff
path: root/scene/animation/animation_node_state_machine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/animation/animation_node_state_machine.cpp')
-rw-r--r--scene/animation/animation_node_state_machine.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp
index ce1e75a61d..9f5e06c43d 100644
--- a/scene/animation/animation_node_state_machine.cpp
+++ b/scene/animation/animation_node_state_machine.cpp
@@ -225,7 +225,7 @@ bool AnimationNodeStateMachinePlayback::_travel(AnimationNodeStateMachine *p_sta
}
//find the last cost transition
- List<int>::Element *least_cost_transition = NULL;
+ List<int>::Element *least_cost_transition = nullptr;
float least_cost = 1e20;
for (List<int>::Element *E = open_list.front(); E; E = E->next()) {
@@ -516,6 +516,11 @@ AnimationNodeStateMachinePlayback::AnimationNodeStateMachinePlayback() {
len_current = 0;
fading_time = 0;
stop_request = false;
+ len_total = 0.0;
+ pos_current = 0.0;
+ loops_current = 0;
+ fading_pos = 0.0;
+ start_request_travel = false;
}
///////////////////////////////////////////////////////
@@ -525,7 +530,7 @@ void AnimationNodeStateMachine::get_parameter_list(List<PropertyInfo> *r_list) c
List<StringName> advance_conditions;
for (int i = 0; i < transitions.size(); i++) {
StringName ac = transitions[i].transition->get_advance_condition_name();
- if (ac != StringName() && advance_conditions.find(ac) == NULL) {
+ if (ac != StringName() && advance_conditions.find(ac) == nullptr) {
advance_conditions.push_back(ac);
}
}