added playing "game.losing" sound effect for all game engines
authorHolger Schemel <info@artsoft.org>
Sun, 12 Mar 2023 12:31:30 +0000 (13:31 +0100)
committerHolger Schemel <info@artsoft.org>
Sun, 12 Mar 2023 12:34:58 +0000 (13:34 +0100)
src/game.c

index 8d713df727b83175c5b3a6a0f500fa1d0b76c632..49874ed7a437dbf6d2d1ac380eb90708d698cd6a 100644 (file)
@@ -13999,8 +13999,6 @@ void BuryPlayer(struct PlayerInfo *player)
 
   PlayLevelSoundElementAction(jx, jy, player->artwork_element, ACTION_DYING);
 
-  PlaySound(SND_GAME_LOSING);
-
   RemovePlayer(player);
 
   player->buried = TRUE;
@@ -15682,6 +15680,9 @@ void CheckGameOver(void)
 
   if (game_over_delay > 0)
   {
+    if (game_over_delay == game_over_delay_value)
+      PlaySound(SND_GAME_LOSING);
+
     game_over_delay--;
 
     return;