X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_mm%2Fmm_game.c;h=5cdc8ed3114712b6e97fd8f11d1ce9c22a8f8b21;hb=258d9d4ffe4374628f4bf49f2f0a30c4c1701933;hp=8cc08bc47527ed8dd825ac912233a32b631f4d93;hpb=c2507c62924b560ab4c0ad7330cd78fc562f16ce;p=rocksndiamonds.git diff --git a/src/game_mm/mm_game.c b/src/game_mm/mm_game.c index 8cc08bc4..5cdc8ed3 100644 --- a/src/game_mm/mm_game.c +++ b/src/game_mm/mm_game.c @@ -669,6 +669,7 @@ void InitGameEngine_MM(void) game_mm.level_solved = FALSE; game_mm.game_over = FALSE; game_mm.game_over_cause = 0; + game_mm.game_over_message = NULL; game_mm.laser_overload_value = 0; game_mm.laser_enabled = FALSE; @@ -805,25 +806,23 @@ static void FadeOutLaser(void) static void GameOver_MM(int game_over_cause) { - // do not handle game over if request dialog is already active - if (game.request_active) - return; - game_mm.game_over = TRUE; game_mm.game_over_cause = game_over_cause; - - // do not ask to play again if game was never actually played - if (!game.GamePlayed) - return; - - if (setup.ask_on_game_over) - game.restart_game_message = (game_over_cause == GAME_OVER_BOMB ? - "Bomb killed Mc Duffin! Play it again?" : - game_over_cause == GAME_OVER_NO_ENERGY ? - "Out of magic energy! Play it again?" : - game_over_cause == GAME_OVER_OVERLOADED ? - "Magic spell hit Mc Duffin! Play it again?" : - NULL); + game_mm.game_over_message = (game_mm.has_mcduffin ? + (game_over_cause == GAME_OVER_BOMB ? + "Bomb killed Mc Duffin!" : + game_over_cause == GAME_OVER_NO_ENERGY ? + "Out of magic energy!" : + game_over_cause == GAME_OVER_OVERLOADED ? + "Magic spell hit Mc Duffin!" : + NULL) : + (game_over_cause == GAME_OVER_BOMB ? + "Bomb destroyed laser cannon!" : + game_over_cause == GAME_OVER_NO_ENERGY ? + "Out of laser energy!" : + game_over_cause == GAME_OVER_OVERLOADED ? + "Laser beam hit laser cannon!" : + NULL)); SetTileCursorActive(FALSE); } @@ -2833,11 +2832,9 @@ static void Explode_MM(int x, int y, int phase, int mode) Bang_MM(laser.start_edge.x, laser.start_edge.y); - GameOver_MM(GAME_OVER_DELAYED); - laser.overloaded = FALSE; } - else if (IS_MCDUFFIN(center_element)) + else if (IS_MCDUFFIN(center_element) || IS_LASER(center_element)) { GameOver_MM(GAME_OVER_BOMB); }