summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-08-17 11:25:28 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-08-17 11:25:28 +0200
commit06eade1bc274c42fa3fb9d27108056ce91780840 (patch)
tree96ee970f11b74598fc9a8c94ec4e5474238a6c87
parente71ec0b5ebe05a162bec4e8383d4105d60f56a0d (diff)
parentef5d0b1c06e57aca0d638a46d2824c23f85de6a4 (diff)
downloadredot-engine-06eade1bc274c42fa3fb9d27108056ce91780840.tar.gz
Merge pull request #80367 from garychia/anim_signals
Avoid emitting signals if the animation is not ready to be processed
-rw-r--r--scene/animation/animation_blend_tree.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp
index 715d8a5bc1..8da1ef8e1d 100644
--- a/scene/animation/animation_blend_tree.cpp
+++ b/scene/animation/animation_blend_tree.cpp
@@ -150,7 +150,7 @@ double AnimationNodeAnimation::_process(double p_time, bool p_seek, bool p_is_ex
// Emit start & finish signal. Internally, the detections are the same for backward.
// We should use call_deferred since the track keys are still being prosessed.
- if (state->tree) {
+ if (state->tree && !p_test_only) {
// AnimationTree uses seek to 0 "internally" to process the first key of the animation, which is used as the start detection.
if (p_seek && !p_is_external_seeking && cur_time == 0) {
state->tree->call_deferred(SNAME("emit_signal"), "animation_started", animation);