From 74048df92cafee293e22538898a9dcea9291395d Mon Sep 17 00:00:00 2001 From: avolkov Date: Tue, 15 Mar 2005 22:44:19 +0000 Subject: [PATCH] Confirmation sound not played when empty box or dead ship selected (bug #566) git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1575 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/pickship.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sc2/src/sc2code/pickship.c b/sc2/src/sc2code/pickship.c index 5981757b0..6bc2ad518 100644 --- a/sc2/src/sc2code/pickship.c +++ b/sc2/src/sc2code/pickship.c @@ -22,6 +22,7 @@ #include "pickmele.h" #include "races.h" #include "resinst.h" +#include "settings.h" #include "setup.h" #include "sounds.h" #include "libs/mathlib.h" @@ -46,7 +47,9 @@ DoPickBattleShip (PMENU_STATE pMS) pMS->CurFrame = 0; return (FALSE); } - + + SetMenuSounds (MENU_SOUND_NONE, MENU_SOUND_NONE); + if (!pMS->Initialized) { pMS->Initialized = TRUE; @@ -59,7 +62,11 @@ DoPickBattleShip (PMENU_STATE pMS) else if (PulsedInputState.key[KEY_MENU_SELECT]) { if ((HSTARSHIP)pMS->CurFrame) + { + PlaySoundEffect (SetAbsSoundIndex (MenuSounds, 1), + 0, NotPositional (), NULL, GAME_SOUND_PRIORITY); return (FALSE); + } } else { @@ -92,6 +99,9 @@ DoPickBattleShip (PMENU_STATE pMS) else if (new_row == NUM_PICK_SHIP_ROWS) new_row = 0; + PlaySoundEffect (MenuSounds, 0, NotPositional (), + NULL, GAME_SOUND_PRIORITY); + LockMutex (GraphicsLock); #ifdef NEVER