From 75a9ceb6353f1b61e2bd66bc6ec792a496a4e9be Mon Sep 17 00:00:00 2001 From: Ulysse Cura Date: Wed, 19 Aug 2026 14:13:21 +0200 Subject: [PATCH] Fixed animation system frame skipping. --- src/components/animation_system.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/animation_system.c b/src/components/animation_system.c index d54dd68..5b5db10 100644 --- a/src/components/animation_system.c +++ b/src/components/animation_system.c @@ -34,9 +34,9 @@ int animation_system_update(component_t *system) { system_data->frame_timer_ms += game.delta_time_ms; - if(system_data->frame_timer_ms >= system_data->frame_delay_ms) + while(system_data->frame_timer_ms >= system_data->frame_delay_ms) { - system_data->frame_timer_ms = 0.0f; + system_data->frame_timer_ms -= system_data->frame_delay_ms; if(system_data->reverse) {