projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added deactivating text (and selectbox) gadgets with "Escape" key
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index 71740a8f4931186bbcd5a08847518cef733528d5..9197a84aabf755f9e049e39f81ec22827612d20d 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-3566,6
+3566,8
@@
void InitGame(void)
game.LevelSolved = FALSE;
game.GameOver = FALSE;
game.LevelSolved = FALSE;
game.GameOver = FALSE;
+ game.GamePlayed = !tape.playing;
+
game.LevelSolved_GameWon = FALSE;
game.LevelSolved_GameEnd = FALSE;
game.LevelSolved_SaveTape = FALSE;
game.LevelSolved_GameWon = FALSE;
game.LevelSolved_GameEnd = FALSE;
game.LevelSolved_SaveTape = FALSE;
@@
-11483,6
+11485,10
@@
static void GameActionsExt(void)
if (tape.recording)
TapeRecordAction(tape_action);
if (tape.recording)
TapeRecordAction(tape_action);
+ // remember if game was played (especially after tape stopped playing)
+ if (!tape.playing && summarized_player_action)
+ game.GamePlayed = TRUE;
+
#if USE_NEW_PLAYER_ASSIGNMENTS
// !!! also map player actions in single player mode !!!
// if (game.team_mode)
#if USE_NEW_PLAYER_ASSIGNMENTS
// !!! also map player actions in single player mode !!!
// if (game.team_mode)
@@
-15032,6
+15038,10
@@
void CheckGameOver(void)
if (game.request_active)
return;
if (game.request_active)
return;
+ // do not ask to play again if game was never actually played
+ if (!game.GamePlayed)
+ return;
+
if (!game_over)
{
last_game_over = FALSE;
if (!game_over)
{
last_game_over = FALSE;