Skip to content

Commit

Permalink
simplify replay_controller::update_teams
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Sep 9, 2015
1 parent dbe107f commit 769d79a
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/replay_controller.cpp
Expand Up @@ -488,14 +488,7 @@ void replay_controller::play_replay()

void replay_controller::update_teams()
{
int next_team = current_side();
if(static_cast<size_t>(next_team) > gamestate().board_.teams().size()) {
next_team = 1;
}

gui_->set_team(vision_ == HUMAN_TEAM ? gamestate().first_human_team_ : next_team - 1, vision_ == SHOW_ALL);

gui_->set_playing_team(next_team - 1);
gui_->set_team(vision_ == HUMAN_TEAM ? gamestate().first_human_team_ : current_side() - 1, vision_ == SHOW_ALL);
gui_->invalidate_all();
}

Expand Down

0 comments on commit 769d79a

Please sign in to comment.