rnd-20060219-1-src
[rocksndiamonds.git] / src / screens.c
index 9ee9ca4972a9719731f0885f390c4928f867a2cd..bf212d76f65969cbeb1264aae0d71ccfa8392dbe 100644 (file)
@@ -2047,6 +2047,7 @@ static struct TokenInfo setup_info_game[] =
   { TYPE_SWITCH,       &setup.skip_levels,     "Skip Levels:"          },
   { TYPE_SWITCH,       &setup.time_limit,      "Timelimit:"            },
   { TYPE_SWITCH,       &setup.autorecord,      "Auto-Record:"          },
+  { TYPE_SWITCH,       &setup.quick_switch,    "Quick Switch:"         },
   { TYPE_EMPTY,                NULL,                   ""                      },
   { TYPE_LEAVE_MENU,   execSetupMain,          "Back"                  },
 
@@ -3088,16 +3089,36 @@ void HandleGameActions()
     byte tape_action[MAX_PLAYERS];
     int i;
 
+#if 1
     if (level.native_em_level->lev->home == 0) /* all players at home */
     {
+      local_player->LevelSolved = TRUE;
+      AllPlayersGone = TRUE;
+
+      level.native_em_level->lev->home = -1;
+    }
+
+    if (local_player->LevelSolved)
       GameWon();
 
-      if (!TAPE_IS_STOPPED(tape))
+    if (AllPlayersGone && !TAPE_IS_STOPPED(tape))
+      TapeStop();
+
+    if (game_status != GAME_MODE_PLAYING)
+      return;
+#else
+    if (level.native_em_level->lev->home == 0) /* all players at home */
+    {
+      if (local_player->LevelSolved)
+       GameWon();
+
+      if (AllPlayersGone && !TAPE_IS_STOPPED(tape))
        TapeStop();
 
       if (game_status != GAME_MODE_PLAYING)
        return;
     }
+#endif
 
     if (level.native_em_level->ply[0]->alive == 0 &&
        level.native_em_level->ply[1]->alive == 0 &&