cleanup of function for fading laser in MM engine
authorHolger Schemel <info@artsoft.org>
Mon, 2 Jan 2023 10:56:53 +0000 (11:56 +0100)
committerHolger Schemel <info@artsoft.org>
Mon, 2 Jan 2023 10:56:53 +0000 (11:56 +0100)
src/game_mm/mm_game.c

index cfc8586a874f974ab2674c82b504c00df841b025..8f61572d9c26a69da2b14f0704949c1ad049ca15 100644 (file)
@@ -725,7 +725,7 @@ void InitGameActions_MM(void)
   SetTileCursorActive(TRUE);
 }
 
-static void FadeOutLaser(boolean overloaded)
+static void FadeOutLaser(void)
 {
   int i;
 
@@ -741,8 +741,7 @@ static void FadeOutLaser(boolean overloaded)
 
   DrawLaser(0, DL_LASER_DISABLED);
 
-  if (!overloaded)
-    StopSound_MM(SND_MM_GAME_HEALTH_CHARGING);
+  StopSound_MM(SND_MM_GAME_HEALTH_CHARGING);
 }
 
 static void GameOver_MM(int game_over_cause)
@@ -3211,7 +3210,7 @@ static void GameActions_MM_Ext(void)
     }
     else if (game.time_limit && !game_mm.game_over)
     {
-      FadeOutLaser(FALSE);
+      FadeOutLaser();
 
       GameOver_MM(GAME_OVER_NO_ENERGY);
 
@@ -3302,7 +3301,7 @@ static void GameActions_MM_Ext(void)
     {
       UpdateAndDisplayGameControlValues();
 
-      FadeOutLaser(TRUE);
+      FadeOutLaser();
 
       GameOver_MM(GAME_OVER_OVERLOADED);