From: Holger Schemel Date: Wed, 10 Oct 2018 22:03:24 +0000 (+0200) Subject: fixed bug with high scores for wrong level when auto-playing next level X-Git-Tag: 4.1.2.0~141 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=4df30ea516e9959b31fb1df62d7766a9df30faef;p=rocksndiamonds.git fixed bug with high scores for wrong level when auto-playing next level --- diff --git a/src/game.c b/src/game.c index 5fa57e59..40efde17 100644 --- a/src/game.c +++ b/src/game.c @@ -4667,6 +4667,8 @@ void GameWon(void) void GameEnd(void) { + /* used instead of "level_nr" (needed for network games) */ + int last_level_nr = levelset.level_nr; int hi_pos; local_player->LevelSolved_GameEnd = TRUE; @@ -4723,14 +4725,13 @@ void GameEnd(void) } } - /* used instead of last "level_nr" (for network games) */ - hi_pos = NewHiScore(levelset.level_nr); + hi_pos = NewHiScore(last_level_nr); if (hi_pos >= 0 && !setup.skip_scores_after_game) { SetGameStatus(GAME_MODE_SCORES); - DrawHallOfFame(levelset.level_nr, hi_pos); + DrawHallOfFame(last_level_nr, hi_pos); } else if (setup.auto_play_next_level && setup.increment_levels && !network_playing)