fixed bug when checking if end of slope is blocked by other element
[rocksndiamonds.git] / src / game_mm / mm_game.c
index 204ddf63a95daef1328ee1d399f8a304fd4348ee..5c5619d0e8e54fc12f51f7ffa9342420323686aa 100644 (file)
@@ -837,16 +837,24 @@ void InitGameActions_MM(void)
     AdvanceFrameCounter();
     AdvanceGfxFrame();
 
-    DrawLevel_MM();
-
-    BackToFront_MM();
+    if (PendingEscapeKeyEvent())
+      continue;
 
 #ifdef DEBUG
     if (setup.quick_doors)
       continue;
 #endif
+
+    DrawLevel_MM();
+
+    BackToFront_MM();
   }
 
+#ifdef DEBUG
+  if (setup.quick_doors)
+    DrawLevel_MM();
+#endif
+
   ScanLaser();
 
   if (game_mm.kettles_still_needed == 0)
@@ -1973,7 +1981,7 @@ static boolean HitElement(int element, int hit_mask)
          {
            int pos = getMaskFromElement(element_side);
 
-           if (mm_masks[pos][dx / 2][dx / 2] == 'X')
+           if (mm_masks[pos][dx / 2][dy / 2] == 'X')
              laser.overloaded = TRUE;
          }
        }