game.LevelSolved_CountingScore = 0;
game.LevelSolved_CountingHealth = 0;
+ game.RestartGameRequested = FALSE;
+
game.panel.active = TRUE;
game.no_level_time_limit = (level.time == 0);
if (game.request_active)
return FALSE;
+ // do not ask to play again if request dialog already handled
+ if (game.RestartGameRequested)
+ return FALSE;
+
// do not ask to play again if game was never actually played
if (!game.GamePlayed)
return FALSE;
if (!setup.ask_on_game_over)
return FALSE;
+ game.RestartGameRequested = TRUE;
+
RequestRestartGame();
return TRUE;
};
int i;
+ // do not redraw pause button on closed door (may happen when restarting game)
+ if (!(GetDoorState() & DOOR_OPEN_1))
+ return;
+
for (i = 0; ids[i] > -1; i++)
ModifyGadget(game_gadget[ids[i]], GDI_CHECKED, tape.pausing, GDI_END);
}