From: Holger Schemel Date: Wed, 11 May 2022 11:54:19 +0000 (+0200) Subject: added storing next level to play from hall of fame X-Git-Tag: 4.3.2.2~29 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=c87fc56ebe59b3d5158e7e6f01d7aa9bf667737e;p=rocksndiamonds.git added storing next level to play from hall of fame --- diff --git a/src/files.c b/src/files.c index f0ed1e41..4a980dff 100644 --- a/src/files.c +++ b/src/files.c @@ -8693,6 +8693,7 @@ static void setScoreInfoToDefaultsExt(struct ScoreInfo *scores) // The following values are intentionally not reset here: // - last_level_nr // - last_entry_nr + // - next_level_nr // - continue_playing // - continue_on_return } diff --git a/src/game.c b/src/game.c index aff7972a..259d19b6 100644 --- a/src/game.c +++ b/src/game.c @@ -5051,6 +5051,7 @@ void GameEnd(void) if (setup.auto_play_next_level) { scores.continue_playing = TRUE; + scores.next_level_nr = level_nr; LoadLevel(level_nr); diff --git a/src/main.h b/src/main.h index 4d566eae..f1b3f1ac 100644 --- a/src/main.h +++ b/src/main.h @@ -3123,6 +3123,7 @@ struct ScoreInfo int last_added_local; int last_level_nr; int last_entry_nr; + int next_level_nr; boolean updated; boolean uploaded; diff --git a/src/screens.c b/src/screens.c index 1bc0dcd6..2b575392 100644 --- a/src/screens.c +++ b/src/screens.c @@ -4341,6 +4341,9 @@ static int getAlignYOffsetFromTreeInfo(TreeInfo *ti) static void StartPlayingFromHallOfFame(void) { + level_nr = scores.next_level_nr; + LoadLevel(level_nr); + StartGameActions(network.enabled, setup.autorecord, level.random_seed); }