From: Holger Schemel Date: Sun, 12 Mar 2023 12:17:40 +0000 (+0100) Subject: fixed bug with playing two global game sounds as game element sounds X-Git-Tag: 4.3.5.2~10 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=ca4a7685;p=rocksndiamonds.git fixed bug with playing two global game sounds as game element sounds The two game sounds "game.losing" and "game.sokoban_solving" were played as playfield position related, game element specific sounds before (which especially caused problems with "game.losing" being defined as a loop sound, but which was stopped after a very short time, because loop sounds have to be regularly re-initiated to keep playing, which was not the case here). As a result, the sound effect "game.losing" (an evil laughter after the player has died) could effectively not be heard anymore after a game was lost for many years. --- diff --git a/src/game.c b/src/game.c index a2afc3e3..8d713df7 100644 --- a/src/game.c +++ b/src/game.c @@ -13998,7 +13998,8 @@ void BuryPlayer(struct PlayerInfo *player) return; PlayLevelSoundElementAction(jx, jy, player->artwork_element, ACTION_DYING); - PlayLevelSound(jx, jy, SND_GAME_LOSING); + + PlaySound(SND_GAME_LOSING); RemovePlayer(player); @@ -14656,7 +14657,7 @@ static int DigField(struct PlayerInfo *player, LevelSolved(); - PlayLevelSound(x, y, SND_GAME_SOKOBAN_SOLVING); + PlaySound(SND_GAME_SOKOBAN_SOLVING); } } else