MP Lobby sounds are now considered UI sounds.

The timer warning bell now uses the turn bell volume.

The timer warning bell rings if the UI sounds, SoundFX, or the turn
bell are enabled.
This commit is contained in:
Patrick Parker 2007-03-07 07:02:35 +00:00
parent ab27cbaf4a
commit 3afeb31655
4 changed files with 12 additions and 7 deletions

View file

@ -2425,7 +2425,7 @@ void display::add_chat_message(const std::string& speaker, int side, const std::
std::string msg;
if (bell) {
sound::play_sound(game_config::sounds::receive_message);
sound::play_UI_sound(game_config::sounds::receive_message);
}
if(message.find("/me ") == 0) {

View file

@ -469,7 +469,7 @@ void ui::process_network_data(const config& data, const network::connection /*so
}
if (!ignored){
sound::play_sound(game_config::sounds::receive_message);
sound::play_UI_sound(game_config::sounds::receive_message);
chat_.add_message(msg["sender"], msg["message"]);
chat_.update_textbox(chat_textbox_);
@ -493,7 +493,7 @@ void ui::process_network_data(const config& data, const network::connection /*so
}
if (!ignored){
sound::play_sound(game_config::sounds::receive_message);
sound::play_UI_sound(game_config::sounds::receive_message);
chat_.add_message("whisper: "+cwhisper["sender"], cwhisper["message"]);
chat_.update_textbox(chat_textbox_);
}
@ -689,9 +689,9 @@ void ui::set_user_list(const std::vector<std::string>& list, bool silent)
{
if(!silent) {
if(list.size() < user_list_.size()) {
sound::play_sound(game_config::sounds::user_leave);
sound::play_UI_sound(game_config::sounds::user_leave);
} else if(list.size() > user_list_.size()) {
sound::play_sound(game_config::sounds::user_arrive);
sound::play_UI_sound(game_config::sounds::user_arrive);
}
}

View file

@ -141,7 +141,12 @@ void playmp_controller::play_human_turn(){
cur_ticks = ticks;
if ( current_team().countdown_time() <= beep_warning_time_){
beep_warning_time_ = beep_warning_time_ - 1000;
sound::play_sound("bell.wav");
const bool bell_on = preferences::turn_bell();
if(bell_on || preferences::sound_on() || preferences::UI_sound_on()) {
preferences::set_turn_bell(true);
sound::play_bell("bell.wav");
preferences::set_turn_bell(bell_on);
}
}
} else {
// Clock time ended

View file

@ -69,7 +69,7 @@ void turn_info::send_data()
turn_info::PROCESS_DATA_RESULT turn_info::process_network_data(const config& cfg, network::connection from, std::deque<config>& backlog, bool skip_replay)
{
if(cfg.child("whisper") != NULL && is_observer()){
sound::play_sound(game_config::sounds::receive_message);
sound::play_UI_sound(game_config::sounds::receive_message);
const config& cwhisper = *cfg.child("whisper");
gui_.add_chat_message("whisper: "+cwhisper["sender"],0,cwhisper["message"], display::MESSAGE_PRIVATE, preferences::message_bell());