From 06e7426701be858c522a20c72ba9919d876771f6 Mon Sep 17 00:00:00 2001 From: Ulysse Cura Date: Sat, 8 Aug 2026 12:15:37 +0200 Subject: [PATCH] Limiting frame tiome to 100ms so lag don't brake physics. --- src/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.c b/src/main.c index 02d9a04..bc463fa 100644 --- a/src/main.c +++ b/src/main.c @@ -10,6 +10,7 @@ static inline void update_time(void) static uint64_t last_clock_state = 0; uint64_t start_clock = SDL_GetTicksNS(); game.delta_time_ms = SDL_NS_TO_MS((float)(start_clock - last_clock_state)); + if(game.delta_time_ms > 100.0f) game.delta_time_ms = 100.0f; last_clock_state = start_clock; }