Godot Engine – Multi-platform 2D and 3D game engine
Fix Abort on Reset functionality in OneShot
vaner-org48327b235bb5
diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cppindex a532c6d62b2..a5d6e23b62f 100644--- a/scene/animation/animation_blend_tree.cpp+++ b/scene/animation/animation_blend_tree.cpp@@ -600,15 +600,15 @@ AnimationNode::NodeTimeInfo AnimationNodeOneShot::_process(ProcessState &p_procebool p_is_external_seeking = p_playback_info.is_external_seeking;bool do_start = cur_request == ONE_SHOT_REQUEST_FIRE;-- bool is_reset = Math::is_zero_approx(p_time) && p_seek && !p_is_external_seeking;- if (is_reset && cur_internal_active) {- do_start = true;- }-bool is_abort = cur_request == ONE_SHOT_REQUEST_ABORT;- if (is_reset && !do_start && (is_fading_out || (abort_on_reset && cur_active))) {- is_abort = true;+ bool is_reset = Math::is_zero_approx(p_time) && p_seek && !p_is_external_seeking;+ if (is_reset) {+ if (!do_start && (is_fading_out || (abort_on_reset && cur_active))) {+ is_abort = true;+ }+ if (cur_internal_active) {+ do_start = true;+ }}if (is_abort) {