X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=643d36e5840230e1389bb7c911d79151726d70e2;hb=906d4415f86868dac164b4a7109b65a2f909552b;hp=49874ed7a437dbf6d2d1ac380eb90708d698cd6a;hpb=eb8011858b57a461b9076c551179d4e22f195149;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index 49874ed7..643d36e5 100644 --- a/src/game.c +++ b/src/game.c @@ -15639,15 +15639,21 @@ void RequestRestartGame(char *message) boolean has_started_game = hasStartedNetworkGame(); int request_mode = (has_started_game ? REQ_ASK : REQ_CONFIRM); + int door_state = DOOR_CLOSE_1; - if (Request(message, request_mode | REQ_STAY_CLOSED) && has_started_game) + if (Request(message, request_mode | REQ_STAY_OPEN) && has_started_game) { + CloseDoor(door_state); + StartGameActions(network.enabled, setup.autorecord, level.random_seed); } else { - // needed in case of envelope request to close game panel - CloseDoor(DOOR_CLOSE_1); + // 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); @@ -15680,7 +15686,7 @@ void CheckGameOver(void) if (game_over_delay > 0) { - if (game_over_delay == game_over_delay_value) + if (game_over_delay == game_over_delay_value / 2) PlaySound(SND_GAME_LOSING); game_over_delay--;