From b4ffb7ab7d99059ee4b51bebfefca3918486f2ab Mon Sep 17 00:00:00 2001 From: poopy Date: Sun, 6 Oct 2024 22:16:39 +0200 Subject: [PATCH] Don't trigger animation events when paused 2 (#15682) # Objective I completely forgot that animation events are triggered in two separate systems (sorry). The issue ~~fixed~~ by #15677, can still happen if the animation event is not targeting a specific bone. ## Solution _Realy_ don't trigger animation events for paused animations. --- crates/bevy_animation/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs index 28e791d6a9990..8e74f5ddb15ba 100755 --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -951,6 +951,10 @@ fn trigger_untargeted_animation_events( }; for (index, active_animation) in player.active_animations.iter() { + if active_animation.paused { + continue; + } + let Some(clip) = graph .get(*index) .and_then(|node| match &node.node_type {