Skip to content

Commit

Permalink
sync unit creation in [side]
Browse files Browse the repository at this point in the history
especialy the traits, we use a set_random_determinstic for that.
  • Loading branch information
gfgtdf authored and cbeck88 committed May 16, 2014
1 parent 8a7e4d6 commit 86675be
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/play_controller.cpp
Expand Up @@ -225,10 +225,13 @@ void play_controller::init(CVideo& video){
gamedata_.build_team_stage_one(tb_ptr);
team_builders.push_back(tb_ptr);
}

BOOST_FOREACH(team_builder_ptr tb_ptr, team_builders)
{
gamedata_.build_team_stage_two(tb_ptr);
//sync traits of start units
random_new::set_random_determinstic deterministic(gamedata_.rng());
BOOST_FOREACH(team_builder_ptr tb_ptr, team_builders)
{
gamedata_.build_team_stage_two(tb_ptr);
}
}

// mouse_handler expects at least one team for linger mode to work.
Expand Down

0 comments on commit 86675be

Please sign in to comment.