summaryrefslogtreecommitdiff
path: root/scene/animation/animation_blend_tree.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-22 09:59:54 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-22 09:59:54 +0100
commitdff8a51c6c75902f71bf0279f874fc56e502824c (patch)
tree3d05e9b88d55e53d7bf6d5d70fb7b61c1ef49c85 /scene/animation/animation_blend_tree.cpp
parent4b4e701e06ecae6f754d206016b8dec5b9bb62d4 (diff)
parent17ce879a15dac1d79f5c9a093b0cc54b8e8ff02e (diff)
Merge pull request #68593 from TokageItLab/optimize-blend-animation
Optimize animation blend tree process
Diffstat (limited to 'scene/animation/animation_blend_tree.cpp')
-rw-r--r--scene/animation/animation_blend_tree.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp
index 0c91729a6f..846c102e3f 100644
--- a/scene/animation/animation_blend_tree.cpp
+++ b/scene/animation/animation_blend_tree.cpp
@@ -726,9 +726,11 @@ double AnimationNodeTransition::process(double p_time, bool p_seek, bool p_seek_
double rem = 0.0;
- for (int i = 0; i < enabled_inputs; i++) {
- if (i != cur_current && i != cur_prev) {
- blend_input(i, p_time, p_seek, p_seek_root, 0, FILTER_IGNORE, sync);
+ if (sync) {
+ for (int i = 0; i < enabled_inputs; i++) {
+ if (i != cur_current && i != cur_prev) {
+ blend_input(i, p_time, p_seek, p_seek_root, 0, FILTER_IGNORE, true);
+ }
}
}