fixed bug with laser still growing amoeba after it was destroyed by bomb
authorHolger Schemel <info@artsoft.org>
Fri, 7 Apr 2017 06:42:46 +0000 (08:42 +0200)
committerHolger Schemel <info@artsoft.org>
Fri, 23 Mar 2018 22:21:12 +0000 (23:21 +0100)
src/game_mm/mm_game.c

index 3a0c60d1254c37a61be0950e9c33b40c83ea7069..f89e23d80168367b31614bc36ff6c8335342c036 100644 (file)
@@ -275,6 +275,9 @@ static void InitLaser()
   laser.num_beamers = 0;
   laser.beamer_edge[0] = 0;
 
+  laser.dest_element = EL_EMPTY;
+  laser.wall_mask = 0;
+
   AddLaserEdge(LX, LY);                /* set laser starting edge */
 
   pen_ray = GetPixelFromRGB(window,
@@ -2181,9 +2184,8 @@ static void Explode_MM(int x, int y, int phase, int mode)
   {
     if (Store[x][y] == EL_BOMB)
     {
-      laser.num_damages--;
       DrawLaser(0, DL_LASER_DISABLED);
-      laser.num_edges = 0;
+      InitLaser();
 
       Bang_MM(laser.start_edge.x, laser.start_edge.y);
       Store[x][y] = EL_EMPTY;