projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3eb1f49
)
fixed closing doors simultaneously when aborting restart from level editor
author
Holger Schemel
<info@artsoft.org>
Sun, 12 Mar 2023 12:55:14 +0000
(13:55 +0100)
committer
Holger Schemel
<info@artsoft.org>
Sun, 12 Mar 2023 12:55:26 +0000
(13:55 +0100)
src/game.c
patch
|
blob
|
history
diff --git
a/src/game.c
b/src/game.c
index af43302f25dcf17a14fcbebab8b6f5494371a602..643d36e5840230e1389bb7c911d79151726d70e2 100644
(file)
--- 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);
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
{
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);
SetGameStatus(GAME_MODE_MAIN);