fixup party full bell
after fix of bug #21578, the behavior from 1.10, in which game may not start until all sides have chosen factions as needed, was restored. we move the party full bell appropriately.
This commit is contained in:
parent
186e66cec6
commit
886c2390d8
2 changed files with 6 additions and 5 deletions
|
@ -595,11 +595,6 @@ void connect::update_playerlist_state(bool silent)
|
|||
set_user_list(playerlist, silent);
|
||||
set_user_menu_items(playerlist);
|
||||
}
|
||||
|
||||
if (!silent && !engine_.sides_available() && engine_.can_start_game()) {
|
||||
DBG_MP << "play party full sound" << std::endl;
|
||||
sound::play_UI_sound(game_config::sounds::party_full_bell);
|
||||
}
|
||||
}
|
||||
|
||||
} // end namespace mp
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "map.hpp"
|
||||
#include "multiplayer_ui.hpp"
|
||||
#include "mp_game_utils.hpp"
|
||||
#include "sound.hpp"
|
||||
#include "tod_manager.hpp"
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
@ -712,9 +713,14 @@ std::pair<bool, bool> connect_engine::process_network_data(const config& data,
|
|||
if (const config& change_faction = data.child("change_faction")) {
|
||||
int side_taken = find_user_side_index_by_id(change_faction["name"]);
|
||||
if (side_taken != -1 || !first_scenario_) {
|
||||
bool was_waiting_for_faction = side_engines_[side_taken]->waiting_to_choose_faction();
|
||||
import_user(change_faction, false, side_taken);
|
||||
|
||||
update_and_send_diff();
|
||||
if (was_waiting_for_faction && can_start_game()) {
|
||||
DBG_MP << "play party full sound" << std::endl;
|
||||
sound::play_UI_sound(game_config::sounds::party_full_bell);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue