Fixed bug #12423
...and a conflict between [side] side [side] and the multiplayer screen side
This commit is contained in:
parent
e78b90382c
commit
ed439533b4
3 changed files with 5 additions and 3 deletions
|
@ -655,7 +655,7 @@ void connect::process_network_data(const config& data, const network::connection
|
|||
}
|
||||
|
||||
if (!data["side"].empty()) {
|
||||
int side_taken = lexical_cast_default<int>(data["side"], 0);
|
||||
int side_taken = lexical_cast_default<int>(data["side"], 0) - 1;
|
||||
|
||||
// Checks if the connecting user has a valid and unique name.
|
||||
const std::string name = data["name"];
|
||||
|
|
|
@ -237,7 +237,7 @@ void wait::join_game(bool observe)
|
|||
//team_ = faction_choice;
|
||||
|
||||
config response;
|
||||
response["side"] = lexical_cast<std::string>(side_choice);
|
||||
response["side"] = lexical_cast<std::string>(side_choice + 1);
|
||||
response["name"] = preferences::login();
|
||||
response["faction"] = lexical_cast<std::string>(faction_choice);
|
||||
response["leader"] = leader_choice;
|
||||
|
|
|
@ -234,7 +234,9 @@ LEVEL_RESULT play_level(const game_data& gameinfo, const config& game_config,
|
|||
|
||||
LOG_NG << "initializing team...\n";
|
||||
|
||||
if (first_human_team == -1 && ((**ui)["controller"] == "human" || (**ui)["persistent"] == "1")) {
|
||||
if ((**ui)["controller"] == preferences::client_type() && (**ui)["description"] == preferences::login()) {
|
||||
first_human_team = ui - unit_cfg.begin();
|
||||
} else if(first_human_team == -1 && ((**ui)["controller"] == "human" || (**ui)["persistent"] == "1")) {
|
||||
first_human_team = ui - unit_cfg.begin();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue