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
This commit is contained in:
avolkov
2005-03-15 22:44:19 +00:00
parent b6e74c20c4
commit 74048df92c
+10
View File
@@ -22,6 +22,7 @@
#include "pickmele.h" #include "pickmele.h"
#include "races.h" #include "races.h"
#include "resinst.h" #include "resinst.h"
#include "settings.h"
#include "setup.h" #include "setup.h"
#include "sounds.h" #include "sounds.h"
#include "libs/mathlib.h" #include "libs/mathlib.h"
@@ -47,6 +48,8 @@ DoPickBattleShip (PMENU_STATE pMS)
return (FALSE); return (FALSE);
} }
SetMenuSounds (MENU_SOUND_NONE, MENU_SOUND_NONE);
if (!pMS->Initialized) if (!pMS->Initialized)
{ {
pMS->Initialized = TRUE; pMS->Initialized = TRUE;
@@ -59,7 +62,11 @@ DoPickBattleShip (PMENU_STATE pMS)
else if (PulsedInputState.key[KEY_MENU_SELECT]) else if (PulsedInputState.key[KEY_MENU_SELECT])
{ {
if ((HSTARSHIP)pMS->CurFrame) if ((HSTARSHIP)pMS->CurFrame)
{
PlaySoundEffect (SetAbsSoundIndex (MenuSounds, 1),
0, NotPositional (), NULL, GAME_SOUND_PRIORITY);
return (FALSE); return (FALSE);
}
} }
else else
{ {
@@ -92,6 +99,9 @@ DoPickBattleShip (PMENU_STATE pMS)
else if (new_row == NUM_PICK_SHIP_ROWS) else if (new_row == NUM_PICK_SHIP_ROWS)
new_row = 0; new_row = 0;
PlaySoundEffect (MenuSounds, 0, NotPositional (),
NULL, GAME_SOUND_PRIORITY);
LockMutex (GraphicsLock); LockMutex (GraphicsLock);
#ifdef NEVER #ifdef NEVER