From: Holger Schemel Date: Tue, 2 Jul 2024 15:15:23 +0000 (+0200) Subject: fixed buggy smooth movement speed in BD engine after wrapping around X-Git-Tag: 4.4.0.0-test-3~8 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=7b732bba2d1002ef0eee32ddbae7cf7df5693b73;p=rocksndiamonds.git fixed buggy smooth movement speed in BD engine after wrapping around --- 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) {