From: Holger Schemel Date: Mon, 10 Apr 2017 21:16:43 +0000 (+0200) Subject: fixed bug with time countdown not stopping at zero (MM engine) X-Git-Tag: 4.1.0.0~122 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=86eb2ffc8cf01f17a3aea2bf0b279014825ec756;p=rocksndiamonds.git fixed bug with time countdown not stopping at zero (MM engine) --- diff --git a/src/game_mm/mm_game.c b/src/game_mm/mm_game.c index fb238504..8b0ba849 100644 --- a/src/game_mm/mm_game.c +++ b/src/game_mm/mm_game.c @@ -3089,9 +3089,10 @@ static void GameActions_MM_Ext(struct MouseActionInfo action, boolean warp_mode) if (FrameReached(&energy_delay, ENERGY_DELAY)) { - game_mm.energy_left--; - if (game_mm.energy_left >= 0) + if (game_mm.energy_left > 0) { + game_mm.energy_left--; + #if 0 BlitBitmap(pix[PIX_DOOR], drawto, DOOR_GFX_PAGEX5 + XX_ENERGY, DOOR_GFX_PAGEY1 + YY_ENERGY, @@ -3100,7 +3101,7 @@ static void GameActions_MM_Ext(struct MouseActionInfo action, boolean warp_mode) #endif redraw_mask |= REDRAW_DOOR_1; } - else if (setup.time_limit) + else if (setup.time_limit && !game_mm.game_over) { int i;