changed level time units from 4-second-intervals to seconds (MM engine)
[rocksndiamonds.git] / src / game_mm / mm_game.c
index fb2385048237889bf373e60c574a208fc67caf04..543be639102099ba2c1f5bad4e9d52e62e972476 100644 (file)
@@ -73,7 +73,7 @@
 #define INIT_GAME_ACTIONS_DELAY        (ONE_SECOND_DELAY / GAME_FRAME_DELAY)
 #define NUM_INIT_CYCLE_STEPS   16
 #define PACMAN_MOVE_DELAY      12
-#define ENERGY_DELAY           (4 * ONE_SECOND_DELAY / GAME_FRAME_DELAY)
+#define ENERGY_DELAY           (ONE_SECOND_DELAY / GAME_FRAME_DELAY)
 #define HEALTH_DEC_DELAY       3
 #define HEALTH_INC_DELAY       9
 #define HEALTH_DELAY(x)                ((x) ? HEALTH_DEC_DELAY : HEALTH_INC_DELAY)
@@ -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;