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.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp
index f1ce948c43..65bf1e0134 100644
--- a/scene/animation/animation_node_state_machine.cpp
+++ b/scene/animation/animation_node_state_machine.cpp
@@ -235,6 +235,7 @@ bool AnimationNodeStateMachinePlayback::_travel(AnimationNodeStateMachine *p_sta
if (cost < least_cost) {
least_cost_transition = E;
+ least_cost = cost;
}
}
@@ -316,8 +317,7 @@ float AnimationNodeStateMachinePlayback::process(AnimationNodeStateMachine *p_st
if (!playing) {
String node_name = start_request;
start_request = StringName();
- ERR_EXPLAIN("Can't travel to '" + node_name + "' if state machine is not playing.");
- ERR_FAIL_V(0);
+ ERR_FAIL_V_MSG(0, "Can't travel to '" + node_name + "' if state machine is not playing.");
}
if (!_travel(p_state_machine, start_request)) {