diff --git a/src/game_data.cpp b/src/game_data.cpp index 99ba52bf4813..c135bf976cf6 100644 --- a/src/game_data.cpp +++ b/src/game_data.cpp @@ -202,9 +202,9 @@ void game_data::write_config(config_writer& out){ team_builder_ptr game_data::create_team_builder(const config& side_cfg, std::vector& teams, - const config& level, gamemap& map, unit_map& units) + const config& level, gamemap& map) { - return team_builder_ptr(new team_builder(side_cfg, teams, level, map, units, *this)); + return team_builder_ptr(new team_builder(side_cfg, teams, level, map, *this)); } void game_data::build_team_stage_one(team_builder_ptr tb_ptr) diff --git a/src/game_data.hpp b/src/game_data.hpp index da0fb146cc1f..3716544bf4e0 100644 --- a/src/game_data.hpp +++ b/src/game_data.hpp @@ -98,7 +98,7 @@ class game_data : public variable_set { //create an object responsible for creating and populating a team from a config team_builder_ptr create_team_builder(const config& side_cfg, std::vector& teams, - const config& level, gamemap& map, unit_map& units); + const config& level, gamemap& map); //do first stage of team initialization (everything except unit placement) void build_team_stage_one(team_builder_ptr tb_ptr); diff --git a/src/game_state.cpp b/src/game_state.cpp index 9354a8cf05ee..a0ee58d4e5de 100644 --- a/src/game_state.cpp +++ b/src/game_state.cpp @@ -146,7 +146,7 @@ void game_state::init(const int ticks) } } team_builder_ptr tb_ptr = gamedata_.create_team_builder(side, - board_.teams_, level_, *board_.map_, board_.units_); + board_.teams_, level_, *board_.map_); ++team_num; gamedata_.build_team_stage_one(tb_ptr); team_builders.push_back(tb_ptr); diff --git a/src/teambuilder.hpp b/src/teambuilder.hpp index ef065e997db1..09ff9041bf2e 100644 --- a/src/teambuilder.hpp +++ b/src/teambuilder.hpp @@ -38,7 +38,7 @@ static lg::log_domain log_engine_tc("engine/team_construction"); class team_builder { public: team_builder(const config& side_cfg, std::vector& teams, - const config& level, gamemap& map, unit_map& units, + const config& level, gamemap& map, game_data & gamedata) : gold_info_ngold_(0) , leader_configs_() @@ -51,7 +51,6 @@ class team_builder { , t_(NULL) , teams_(teams) , unit_configs_() - , units_(units) , gamedata_(gamedata) { } @@ -107,7 +106,6 @@ class team_builder { team *t_; std::vector &teams_; std::vector unit_configs_; - unit_map &units_; game_data & gamedata_;