removed redundant closing of doors when (not) restarting game
authorHolger Schemel <holger.schemel@virtion.de>
Tue, 14 Jan 2025 22:44:56 +0000 (23:44 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Tue, 14 Jan 2025 22:55:48 +0000 (23:55 +0100)
src/game.c

index 2f31bc7ff50946c0a0adc0411778d83e8adeb748..7215d695d5618649aa4e38c8d1540a5a82c3f277 100644 (file)
@@ -16554,7 +16554,6 @@ static void RequestRestartGame(void)
   char *message = getRestartGameMessage();
   boolean has_started_game = hasStartedNetworkGame();
   int request_mode = (has_started_game ? REQ_ASK : REQ_CONFIRM);
-  int door_state = DOOR_CLOSE_1;
 
   boolean restart_wanted = (Request(message, request_mode | REQ_STAY_OPEN) && has_started_game);
 
@@ -16568,18 +16567,10 @@ static void RequestRestartGame(void)
 
   if (restart_wanted)
   {
-    CloseDoor(door_state);
-
     StartGameActions(network.enabled, setup.autorecord, level.random_seed);
   }
   else
   {
-    // if game was invoked from level editor, also close tape recorder door
-    if (level_editor_test_game)
-      door_state = DOOR_CLOSE_ALL;
-
-    CloseDoor(door_state);
-
     SetGameStatus(GAME_MODE_MAIN);
 
     DrawMainMenu();