Skip to content

Commit

Permalink
Fixed single player campaign number of players marker (#5591)
Browse files Browse the repository at this point in the history
Modified the default values for a campaign's min_player and max_players in the game creation engine to be min=1, max=1
  • Loading branch information
krazyfencer committed Mar 8, 2021
1 parent 1b6802f commit 7ed2a7a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/game_initialization/create_engine.cpp
Expand Up @@ -181,8 +181,8 @@ campaign::campaign(const config& data)
, id_(data["id"])
, allow_era_choice_(level::allow_era_choice())
, image_label_()
, min_players_(2)
, max_players_(2)
, min_players_(1)
, max_players_(1)
{
if(data.has_attribute("start_year")) {
dates_.first = irdya_date::read_date(data["start_year"]);
Expand All @@ -206,8 +206,8 @@ void campaign::set_metadata()
{
image_label_ = data_["image"].str();

int min = data_["min_players"].to_int(2);
int max = data_["max_players"].to_int(2);
int min = data_["min_players"].to_int(1);
int max = data_["max_players"].to_int(1);

min_players_ = max_players_ = min;

Expand Down

0 comments on commit 7ed2a7a

Please sign in to comment.