From: Holger Schemel Date: Sat, 20 Mar 2021 10:26:55 +0000 (+0100) Subject: fixed counting last step when using steps instead of seconds X-Git-Tag: 4.3.0.0~200 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=046d26abca2f71faa6336d2c6502dc38c61fe721;hp=ef1162b39495bd80698e6e449060ba82a43ed21c;p=rocksndiamonds.git 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. --- 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]); }