Skip to content

Commit

Permalink
Reimplement filtering based on side in game::send_data_sides
Browse files Browse the repository at this point in the history
  • Loading branch information
loonycyborg committed May 2, 2016
1 parent 36b9f7a commit bb61420
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server/game.cpp
Expand Up @@ -1408,7 +1408,9 @@ void game::send_data_sides(simple_wml::document& data,
{
std::vector<int> sides_vec = ::split<int>(sides, ::split_conv_impl());
DBG_GAME << __func__ << "...\n";
send_to_players(data, players_, /*controls_side_helper(*this, sides_vec),*/ exclude);
decltype(players_) filtered_players;
std::copy_if(players_.begin(), players_.end(), filtered_players.begin(), controls_side_helper(*this, sides_vec));
send_to_players(data, filtered_players, exclude);
}

bool game::controls_side(const std::vector<int>& sides, const socket_ptr player) const
Expand Down

0 comments on commit bb61420

Please sign in to comment.