Explorar o código

[godot] Don't apply "[stop]" animation.

badlogic %!s(int64=3) %!d(string=hai) anos
pai
achega
bcf20d764b
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      spine-godot/spine_godot/SpineAnimationTrack.cpp

+ 2 - 2
spine-godot/spine_godot/SpineAnimationTrack.cpp

@@ -294,8 +294,8 @@ void SpineAnimationTrack::update_animation_state(const Variant &variant_sprite)
 		animation_state->clearTrack(track_index);
 		if (found_track_index == -1) return;
 
-		// If no animation is set, we are done.
-		if (EMPTY(animation_name)) return;
+		// If no animation is set or it's set to "[stop]", we are done.
+		if (EMPTY(animation_name) || animation_name == "[stop]") return;
 		
 		// If there's no keys on the timeline for this track, we are done.
 		if (edited_animation->track_get_key_count(found_track_index) == 0) return;