From: Holger Schemel Date: Sun, 12 Mar 2023 12:55:14 +0000 (+0100) Subject: fixed closing doors simultaneously when aborting restart from level editor X-Git-Tag: 4.3.5.2~7 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=a5f00662e9ad7f9d093a417ca05c473939b99108;p=rocksndiamonds.git fixed closing doors simultaneously when aborting restart from level editor --- diff --git a/src/game.c b/src/game.c index af43302f..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);