Skip to content

Commit

Permalink
Merge pull request #80367 from garychia/anim_signals
Browse files Browse the repository at this point in the history
Avoid emitting signals if the animation is not ready to be processed
  • Loading branch information
akien-mga committed Aug 17, 2023
2 parents e71ec0b + ef5d0b1 commit 06eade1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/animation/animation_blend_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 06eade1

Please sign in to comment.