Skip to content

Commit

Permalink
Connect Engine: removed "--give--" entry from controller options
Browse files Browse the repository at this point in the history
This was basically used to separate players from the general controller options. In the GUI1 dialog it
was unselectable. I never got around to implementing that in the GUI2 dialog, but regardless, it doesn't
look great in the menu so I'm removing it. Plus, since the dropdowns are GUI2, we could apply different
text formatting to denote players if we wanted.
  • Loading branch information
Vultraz authored and GregoryLundberg committed Nov 30, 2017
1 parent 88e47a8 commit 052d2e1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
5 changes: 0 additions & 5 deletions src/game_initialization/connect_engine.cpp
Expand Up @@ -1034,7 +1034,6 @@ config side_engine::new_config() const
res["name"] = desc;
}

assert(controller_ != CNTR_LAST);
if(controller_ == CNTR_COMPUTER && allow_player_) {
// Do not import default ai cfg otherwise - all is set by scenario config.
res.add_child_at("ai", config {"ai_algorithm", ai_algorithm_}, 0);
Expand Down Expand Up @@ -1286,7 +1285,6 @@ void side_engine::update_controller_options()
}

// Connected users.
add_controller_option(CNTR_LAST, _("--give--"), "human");
for(const std::string& user : parent_.connected_users()) {
add_controller_option(parent_.default_controller_, user, "human");
}
Expand Down Expand Up @@ -1317,9 +1315,6 @@ void side_engine::update_current_controller_index()
bool side_engine::controller_changed(const int selection)
{
const ng::controller selected_cntr = controller_options_[selection].first;
if(selected_cntr == CNTR_LAST) {
return false;
}

// Check if user was selected. If so assign a side to him/her.
// If not, make sure that no user is assigned to this side.
Expand Down
1 change: 0 additions & 1 deletion src/game_initialization/connect_engine.hpp
Expand Up @@ -31,7 +31,6 @@ enum controller {
CNTR_COMPUTER,
CNTR_EMPTY,
CNTR_RESERVED,
CNTR_LAST
};

class connect_engine;
Expand Down

0 comments on commit 052d2e1

Please sign in to comment.