Browse Source

If node animation has only 1 track, play it in the given root node regardless of whether the track & node name match.

Lasse Öörni 12 years ago
parent
commit
4aaec71d20
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Engine/Graphics/AnimationState.cpp

+ 1 - 1
Engine/Graphics/AnimationState.cpp

@@ -78,7 +78,7 @@ AnimationState::AnimationState(Node* node, Animation* animation) :
             {
             {
                 const StringHash& nameHash = tracks[i].nameHash_;
                 const StringHash& nameHash = tracks[i].nameHash_;
                 
                 
-                if (node_->GetNameHash() == nameHash)
+                if (node_->GetNameHash() == nameHash || tracks.Size() == 1)
                     trackToNodeMap_[i] = node_;
                     trackToNodeMap_[i] = node_;
                 else
                 else
                 {
                 {