[Change] Better handling of player_flags and sunds when exiting the
game.
This commit is contained in:
parent
c743205286
commit
9278a1851b
@ -250,6 +250,11 @@ static void menu_small_exit(unsigned int wid, char* str) {
|
||||
menu_Close(MENU_INFO);
|
||||
}
|
||||
|
||||
/* Stop player sounds because they sometimes hand! */
|
||||
player_flags = 0;
|
||||
player_stopSound();
|
||||
|
||||
/* Clean up. */
|
||||
window_destroy(wid);
|
||||
menu_Close(MENU_SMALL);
|
||||
menu_main();
|
||||
|
@ -199,7 +199,6 @@ static int player_newMake(void);
|
||||
static void player_newShipMake(char* name);
|
||||
/* Sound. */
|
||||
static void player_initSound(void);
|
||||
/*static void player_stopSound(void) */
|
||||
/* Gui. */
|
||||
static void rect_parse(const xmlNodePtr parent,
|
||||
double* x, double* y, double* w, double* h);
|
||||
@ -655,16 +654,13 @@ void player_playSound(int sound, int once) {
|
||||
sound_playGroup(PLAYER_GUI_CHANNEL, sound, once);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/**
|
||||
* @fn static void player_stopSound(void)
|
||||
*
|
||||
* @brief Stop playing player sounds.
|
||||
*/
|
||||
static void player_stopSound(void) {
|
||||
void player_stopSound(void) {
|
||||
sound_stopGroup(PLAYER_GUI_CHANNEL);
|
||||
sound_stopGroup(PLAYER_ENGINE_CHANNEL);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @fn void player_message(const char* fmt, ...)
|
||||
|
@ -52,6 +52,7 @@ void player_clear(void);
|
||||
void player_warp(const double x, const double y);
|
||||
const char* player_rating(void);
|
||||
void player_playSound(int sound, int once);
|
||||
void player_stopSound(void);
|
||||
/* Cargo. */
|
||||
int player_outfitOwned(const char* outfitname);
|
||||
int player_cargoOwned(const char* commodityname);
|
||||
|
Loading…
Reference in New Issue
Block a user