added graphical panel values for time and health (mainly for MM engine)
[rocksndiamonds.git] / src / game_mm / mm_game.c
index 8a7d381e44ebca3acbb941b3e4b2eb0c04d691b5..0502660ba22cbe7fac7ca49702639d92312f819a 100644 (file)
@@ -292,9 +292,6 @@ void InitGameEngine_MM()
 {
   int i, x, y;
 
-  /* set global editor control values */
-  editor.draw_walls_masked = FALSE;
-
   /* set global game control values */
   game_mm.num_cycle = 0;
   game_mm.num_pacman = 0;
@@ -310,6 +307,8 @@ void InitGameEngine_MM()
   game_mm.game_over = FALSE;
   game_mm.game_over_cause = 0;
 
+  game_mm.laser_overload_value = 0;
+
   /* set global laser control values (must be set before "InitLaser()") */
   laser.start_edge.x = 0;
   laser.start_edge.y = 0;
@@ -571,6 +570,10 @@ void ScanLaser()
   int element;
   int end = 0, rf = laser.num_edges;
 
+  /* do not scan laser again after the game was lost for whatever reason */
+  if (game_mm.game_over)
+    return;
+
   laser.overloaded = FALSE;
   laser.stops_inside_element = FALSE;
 
@@ -2921,6 +2924,8 @@ static void GameActions_MM_Ext(byte action[MAX_PLAYERS], boolean warp_mode)
       laser.overload_value = 0;
     }
 
+    game_mm.laser_overload_value = laser.overload_value;
+
     if (laser.overload_value < MAX_LASER_OVERLOAD - 8)
     {
       int color_up = 0xFF * laser.overload_value / MAX_LASER_OVERLOAD;