Time passes correctly now.

This commit is contained in:
Ulysse Cura 2026-07-22 13:00:45 +02:00
parent dfd1811009
commit d214571ef9
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ void game_handle_event(void)
static inline void update_time(void)
{
clock_t last_clock_state = clock();
static clock_t last_clock_state = 0;
clock_t start_clock = clock();
game.delta_time_ms = (float)(start_clock - last_clock_state) * 1000.0f / CLOCKS_PER_SEC;
last_clock_state = start_clock;