fixed buggy smooth movement speed in BD engine after wrapping around
authorHolger Schemel <holger.schemel@virtion.de>
Tue, 2 Jul 2024 15:15:23 +0000 (17:15 +0200)
committerHolger Schemel <holger.schemel@virtion.de>
Tue, 2 Jul 2024 15:18:11 +0000 (17:18 +0200)
src/game_bd/bd_gameplay.c

index 0baca4fd130ad283edbf28bde0a51a0b7c33222b..b157bdf0640f04fcbfb726a4fca3bfb469e1c221 100644 (file)
@@ -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)
     {