Skip to content

Commit

Permalink
fixup bugfix 21758 (commit 186e66c)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 committed Mar 21, 2014
1 parent eb48917 commit e6abd6d
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/multiplayer_connect_engine.cpp
Expand Up @@ -1018,10 +1018,7 @@ config side_engine::new_config() const

res["name"] = res["user_description"];
res["allow_changes"] = !parent_.params_.saved_game && allow_changes_;
res["chose_random"] = false;
if(cfg_.has_attribute("chose_random")) {
res["chose_random"] = cfg_["chose_random"];
}
res["chose_random"] = chose_random_;

if (!parent_.params_.saved_game) {
// Find a config where a default leader is and set a new type
Expand Down Expand Up @@ -1111,14 +1108,11 @@ bool side_engine::ready_for_start() const
return true;
}

if (available_for_user()) return false;
if (available_for_user()) return false; //if controller_ == CNTR_NETWORK and player_id_.empty(), this line will return false.

if (controller_ == CNTR_NETWORK && !player_id_.empty()) {
if (player_id_ == preferences::login()) {
return true;//the host is ready
}
if (!waiting_to_choose_faction_ || !allow_changes_) {
return true; // Side is assigned to a network player, and they got a chance to choose faction if allowed
if (controller_ == CNTR_NETWORK) {
if (player_id_ == preferences::login() || !waiting_to_choose_faction_ || !allow_changes_) {
return true;//the host is ready. a network player, who got a chance to choose faction if allowed, is also ready
}
}

Expand Down

0 comments on commit e6abd6d

Please sign in to comment.