added deactivating laser target element when disabling laser in MM engine
authorHolger Schemel <info@artsoft.org>
Thu, 12 Jan 2023 08:48:44 +0000 (09:48 +0100)
committerHolger Schemel <info@artsoft.org>
Thu, 12 Jan 2023 08:48:44 +0000 (09:48 +0100)
src/game_mm/mm_game.c

index c9712c9b2639521de4f612d63795cd249aaefc3a..daec6fb77e4751ab8814235a3386658b75cb4bcd 100644 (file)
@@ -1325,6 +1325,9 @@ static void DrawLaserExt(int start_edge, int num_edges, int mode)
 
 void DrawLaser(int start_edge, int mode)
 {
+  if (mode == DL_LASER_DISABLED)
+    DeactivateLaserTargetElement();
+
   if (laser.num_edges - start_edge < 0)
   {
     Warn("DrawLaser: laser.num_edges - start_edge < 0");