Skip to content

Commit

Permalink
expand save_id default value eralier
Browse files Browse the repository at this point in the history
Set this default value immideately after reading the scenario is
importent because otherwise we might endup settings this value to the
multiplayer players name, which would break carryover. (doing this in at
config loading in game_config would be ok too i think.)
  • Loading branch information
gfgtdf committed Jun 15, 2014
1 parent ea6c8d4 commit b00a05f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/saved_game.cpp
Expand Up @@ -199,6 +199,17 @@ void saved_game::expand_scenario()
{
this->starting_pos_type_ = STARTINGPOS_SCENARIO;
this->starting_pos_ = scenario;

//Set this default value immideately after reading the scenario is importent because otherwise
//we might endup settings this value to the multiplayer players name, which would break carryover.
//(doing this in at config loading in game_config would be ok too i think.)
BOOST_FOREACH(config& side, starting_pos_.child_range("side"))
{
if(side["save_id"].str() == "")
{
side["save_id"] = side["id"];
}
}
}
else
{
Expand Down

0 comments on commit b00a05f

Please sign in to comment.