| 88 | } |
| 89 | |
| 90 | void AnimationClient::SetAnimation(const std::string &path, |
| 91 | float fade_speed, |
| 92 | char flags) { |
| 93 | if (flags & _ANM_FROM_START) { |
| 94 | current_anim.clear(); |
| 95 | } |
| 96 | if (current_anim == path) { |
| 97 | return; |
| 98 | } |
| 99 | |
| 100 | AnimationAssetRef new_ref; |
| 101 | if (animation_config.kForceIdleAnim) { |
| 102 | new_ref = ReturnAnimationAssetRef("Data/Animations/r_actionidle.xml"); |
| 103 | } else { |
| 104 | Path new_path = FindFilePath(path); |
| 105 | if (new_path.isValid()) { |
| 106 | new_ref = ReturnAnimationAssetRef(path); |
| 107 | if (new_ref.valid() == false) { |
| 108 | new_ref = ReturnAnimationAssetRef("Data/Animations/r_actionidle.xml"); |
| 109 | } |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | if (new_ref.valid()) { |
| 114 | if (reader.valid()) { |
| 115 | fade_out.AddFadingAnimation(reader, blendmap, fade_speed); |
| 116 | } |
| 117 | ApplyAnimationFlags(reader, new_ref, flags); |
| 118 | current_anim = path; |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | std::queue<AnimationEvent> AnimationClient::GetActiveEvents() { |
| 123 | std::queue<AnimationEvent> total_events; |
nothing calls this directly
no test coverage detected