Explorar el Código

[StateMachine] Fix error message for travel method

Guilherme Felipe hace 6 años
padre
commit
4de6c94eb0
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      scene/animation/animation_node_state_machine.cpp

+ 2 - 1
scene/animation/animation_node_state_machine.cpp

@@ -314,8 +314,9 @@ float AnimationNodeStateMachinePlayback::process(AnimationNodeStateMachine *sm,
 
 
 		if (start_request_travel) {
 		if (start_request_travel) {
 			if (!playing) {
 			if (!playing) {
+				String node_name = start_request;
 				start_request = StringName();
 				start_request = StringName();
-				ERR_EXPLAIN("Can't travel to '" + String(start_request) + "' if state machine is not active.");
+				ERR_EXPLAIN("Can't travel to '" + node_name + "' if state machine is not playing.");
 				ERR_FAIL_V(0);
 				ERR_FAIL_V(0);
 			}
 			}