diff options
author | Yuri Sizov <11782833+YuriSizov@users.noreply.github.com> | 2023-05-18 21:54:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-18 21:54:35 +0200 |
commit | 5bb7d585a5e151f3fa387de7dd97d7aebc5abfd5 (patch) | |
tree | a57e4d4c4599d207b273d4370ec49dfaf70fd482 /scene/animation/animation_tree.cpp | |
parent | 2dc3294ad4822c6872ad58431cd1c9a58306aeac (diff) | |
parent | 18c792fe42fcb01dce5cac8f8b3afed68320d229 (diff) | |
download | redot-engine-5bb7d585a5e151f3fa387de7dd97d7aebc5abfd5.tar.gz |
Merge pull request #51448 from SaracenOne/animation_tree_parallel_state_machine_fix
Allocate unique `track_blends` vector for animation states
Diffstat (limited to 'scene/animation/animation_tree.cpp')
-rw-r--r-- | scene/animation/animation_tree.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp index c6cb3873e0..5d4d58f283 100644 --- a/scene/animation/animation_tree.cpp +++ b/scene/animation/animation_tree.cpp @@ -116,7 +116,7 @@ void AnimationNode::blend_animation(const StringName &p_animation, double p_time AnimationState anim_state; anim_state.blend = p_blend; - anim_state.track_blends = &blends; + anim_state.track_blends = blends; anim_state.delta = p_delta; anim_state.time = p_time; anim_state.animation = animation; @@ -1124,7 +1124,7 @@ void AnimationTree::_process_graph(double p_delta) { ERR_CONTINUE(!state.track_map.has(path)); int blend_idx = state.track_map[path]; ERR_CONTINUE(blend_idx < 0 || blend_idx >= state.track_count); - real_t blend = (*as.track_blends)[blend_idx] * weight; + real_t blend = (as.track_blends)[blend_idx] * weight; Animation::TrackType ttype = a->track_get_type(i); if (ttype != Animation::TYPE_POSITION_3D && ttype != Animation::TYPE_ROTATION_3D && ttype != Animation::TYPE_SCALE_3D && track->type != ttype) { |