Skip to content

Commit

Permalink
Fixed SP option variables never being set (fixes #2401)
Browse files Browse the repository at this point in the history
Was just missing a check for the SP_CAMPAIGN type.
  • Loading branch information
Vultraz committed Feb 1, 2018
1 parent eee4b4e commit 9de2783
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/gui/dialogs/multiplayer/mp_options_helper.cpp
Expand Up @@ -67,7 +67,14 @@ void mp_options_helper::update_all_options()

void mp_options_helper::update_game_options()
{
const std::string type = create_engine_.current_level_type() == ng::level::TYPE::CAMPAIGN ? "campaign" : "multiplayer";
const ng::level::TYPE current_type = create_engine_.current_level_type();
std::string type;

if(current_type == ng::level::TYPE::CAMPAIGN || current_type == ng::level::TYPE::SP_CAMPAIGN) {
type = "campaign";
} else {
type = "multiplayer";
}

// For game options, we check for both types and remove them. This is to prevent options from a game
// of one type remaining visible when selecting a game of another type.
Expand Down

0 comments on commit 9de2783

Please sign in to comment.