From 7b732bba2d1002ef0eee32ddbae7cf7df5693b73 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Tue, 2 Jul 2024 17:15:23 +0200 Subject: [PATCH] fixed buggy smooth movement speed in BD engine after wrapping around --- src/game_bd/bd_gameplay.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/game_bd/bd_gameplay.c b/src/game_bd/bd_gameplay.c index 0baca4fd..b157bdf0 100644 --- a/src/game_bd/bd_gameplay.c +++ b/src/game_bd/bd_gameplay.c @@ -415,12 +415,15 @@ static GdGameState gd_game_main_int(GdGame *game, boolean allow_iterate, boolean // normally nothing happes. but if we iterate, this might change. return_state = GD_GAME_NOTHING; - // if allowing cave movements, add elapsed time to timer. and then we can check what to do. + // if allowing cave movements, ... if (allow_iterate) + { + // ... add elapsed time to timer. and then we can check what to do game->milliseconds_game += millisecs_elapsed; - // increment cycle (frame) counter for the current cave iteration - game->itercycle++; + // ... increment cycle (frame) counter for the current cave iteration + game->itercycle++; + } if (game->milliseconds_game >= cavespeed) { -- 2.34.1