fixed bug with cutting through laser emitter in special cases in MM engine
[rocksndiamonds.git] / src / game_mm / mm_game.c
index 48bc9a5b875724b6d3cd4e2190b32c17e5fb222f..bb027cd06f3e33d32271e283fa0941f9fec3cd7e 100644 (file)
@@ -1473,6 +1473,10 @@ boolean HitElement(int element, int hit_mask)
   // this is more precise: check if laser would go through the center
   if ((ELX * TILEX + 14 - LX) * YS != (ELY * TILEY + 14 - LY) * XS)
   {
+    // prevent cutting through laser emitter with laser beam
+    if (IS_LASER(element))
+      return TRUE;
+
     // skip the whole element before continuing the scan
     do
     {