projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added support for "player is moving up/down" graphics for BD engine
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index 5c3cc9d3d36ec3072332dbea5ec6cd6e2ee2fe7d..506def33ce0682ae91f3903b2802715300dcba56 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-5161,10
+5161,19
@@
void GameEnd(void)
// used instead of "level_nr" (needed for network games)
int last_level_nr = levelset.level_nr;
boolean tape_saved = FALSE;
// used instead of "level_nr" (needed for network games)
int last_level_nr = levelset.level_nr;
boolean tape_saved = FALSE;
+ boolean game_over = checkGameFailed();
// Important note: This function is not only called after "GameWon()", but also after
// "game over" (if automatically asking for restarting the game is disabled in setup)
// Important note: This function is not only called after "GameWon()", but also after
// "game over" (if automatically asking for restarting the game is disabled in setup)
+ // do not handle game end if game over and automatically asking for game restart
+ if (game_over && setup.ask_on_game_over)
+ return;
+
+ // do not handle game end if request dialog is already active
+ if (checkRequestActive())
+ return;
+
if (game.LevelSolved)
game.LevelSolved_GameEnd = TRUE;
if (game.LevelSolved)
game.LevelSolved_GameEnd = TRUE;