From 046d26abca2f71faa6336d2c6502dc38c61fe721 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 20 Mar 2021 11:26:55 +0100 Subject: [PATCH 1/1] fixed counting last step when using steps instead of seconds Before this change, the very last step was not counted anymore when using steps instead of seconds/frames and the game already being marked as "solved". This change (together with the previous commit) fixes this bug. --- src/game.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game.c b/src/game.c index 2432ab34..17df7453 100644 --- a/src/game.c +++ b/src/game.c @@ -13140,7 +13140,7 @@ void ScrollPlayer(struct PlayerInfo *player, int mode) RemovePlayer(player); } - if (!game.LevelSolved && level.use_step_counter) + if (level.use_step_counter) { int i; @@ -13150,14 +13150,14 @@ void ScrollPlayer(struct PlayerInfo *player, int mode) { TimeLeft--; - if (TimeLeft <= 10 && setup.time_limit) + if (TimeLeft <= 10 && setup.time_limit && !game.LevelSolved) PlaySound(SND_GAME_RUNNING_OUT_OF_TIME); game_panel_controls[GAME_PANEL_TIME].value = TimeLeft; DisplayGameControlValues(); - if (!TimeLeft && setup.time_limit) + if (!TimeLeft && setup.time_limit && !game.LevelSolved) for (i = 0; i < MAX_PLAYERS; i++) KillPlayer(&stored_player[i]); } -- 2.34.1