From dae57cd07737014c98ae85564ddc3b2b1755dc9a Mon Sep 17 00:00:00 2001 From: lawnjelly Date: Sun, 11 Sep 2022 19:09:07 +0100 Subject: [PATCH] Low priority redraw request for AnimatedSprite Prevents animated sprite from creating continuous redraws in vital_redraws_only mode. --- scene/2d/animated_sprite.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp index cb5ee85b8..7683a9702 100644 --- a/scene/2d/animated_sprite.cpp +++ b/scene/2d/animated_sprite.cpp @@ -386,6 +386,9 @@ void AnimatedSprite::_notification(int p_what) { if (frame < 0) { return; } + if (!OS::get_singleton()->is_update_pending()) { + return; + } float remaining = get_process_delta_time();