moved code to start playing from hall of fame to separate function
authorHolger Schemel <info@artsoft.org>
Wed, 11 May 2022 11:50:27 +0000 (13:50 +0200)
committerHolger Schemel <info@artsoft.org>
Wed, 11 May 2022 11:51:14 +0000 (13:51 +0200)
src/screens.c

index ed086dc30bd694862bf2cbdb891941aa6e80113a..1bc0dcd66283c6d5e76b817d3a29800ad2141da1 100644 (file)
@@ -4339,6 +4339,11 @@ static int getAlignYOffsetFromTreeInfo(TreeInfo *ti)
   return align_yoffset;
 }
 
+static void StartPlayingFromHallOfFame(void)
+{
+  StartGameActions(network.enabled, setup.autorecord, level.random_seed);
+}
+
 static void DrawChooseTree(TreeInfo **ti_ptr)
 {
   int fade_mask = REDRAW_FIELD;
@@ -5094,8 +5099,8 @@ static void HandleChooseTree(int mx, int my, int dx, int dy, int button,
          {
            if (scores.continue_playing && scores.continue_on_return)
            {
-             StartGameActions(network.enabled, setup.autorecord,
-                              level.random_seed);
+             StartPlayingFromHallOfFame();
+
              return;
            }
            else if (!scores.continue_on_return)