Merge pull request #350 from gfgtdf/mp_1_12_fixes
Mp 1.12 fixes Untested. May fix https://gna.org/bugs/index.php?23036 and https://gna.org/bugs/?22968
This commit is contained in:
commit
75ed1be82b
2 changed files with 6 additions and 5 deletions
|
@ -257,7 +257,7 @@ void connect_engine::import_user(const config& data, const bool observer,
|
|||
|
||||
// Check if user has a side(s) reserved for him.
|
||||
BOOST_FOREACH(side_engine_ptr side, side_engines_) {
|
||||
if (side->current_player() == username && side->player_id().empty()) {
|
||||
if (side->current_player() == username && side->player_id().empty() && side->controller() != CNTR_COMPUTER) {
|
||||
side->place_user(data);
|
||||
|
||||
side_assigned = true;
|
||||
|
|
|
@ -220,11 +220,7 @@ void wait::join_game(bool observe)
|
|||
if (!download_res) {
|
||||
set_result(QUIT);
|
||||
return;
|
||||
} else if (!level_["allow_new_game"].to_bool(true)) {
|
||||
set_result(PLAY);
|
||||
return;
|
||||
}
|
||||
|
||||
if (first_scenario_) {
|
||||
state_ = game_state();
|
||||
state_.classification().campaign_type = "multiplayer";
|
||||
|
@ -246,6 +242,11 @@ void wait::join_game(bool observe)
|
|||
load_game_config_for_game(state_.classification());
|
||||
}
|
||||
|
||||
if (!level_["allow_new_game"].to_bool(true)) {
|
||||
set_result(PLAY);
|
||||
return;
|
||||
}
|
||||
|
||||
// Add the map name to the title.
|
||||
append_to_title(": " + level_["name"].t_str());
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue