From 9f646c867d08f11bb267282e16a3a80c804c4bce 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. (cherry picked from commit 54a939a029a9afd8ec4161b1ef1f2f4d84f69465) --- 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 5589968796c..8c709aba4f9 100644 --- a/scene/2d/animated_sprite.cpp +++ b/scene/2d/animated_sprite.cpp @@ -367,6 +367,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();