added limiting amoeba handling in EM engine to the playfield area
[rocksndiamonds.git] / src / game_em / logic.c
index 89de4ee59f8828232880b579cc0cebcee5d31d2e..d126415b774a3e8357a72a3189386f613a6b5cb7 100644 (file)
@@ -6337,7 +6337,9 @@ void logic_3(void)
     x = lev.left - 1 + (random >> 10) % CAVE_WIDTH;
     y = lev.top  - 1 + (random >> 20) % CAVE_HEIGHT;
 
-    Lamoeba(x, y);
+    if (x >= lev.left && x < lev.right &&
+       y >= lev.top  && y < lev.bottom)
+      Lamoeba(x, y);
 
     random = random * 129 + 1;
   }