diff options
Diffstat (limited to 'server/client.cpp')
-rw-r--r-- | server/client.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/client.cpp b/server/client.cpp index 3977b53..af2c55d 100644 --- a/server/client.cpp +++ b/server/client.cpp @@ -88,8 +88,13 @@ void Client::round_state(const PlayerState& pl_d, const PlayerState& pl_r, const connection->send(make_shared<Message::RoundState>(pl_d, pl_r, pl_u, pl_l, d, a)); } -void Client::round_end() { +void Client::round_end(boost::function<void ()> callback) { connection->send(make_shared<Message::RoundEnd>()); + + // Check if we're waiting for ready. + if(callback) { + connection->recv(boost::bind(&Client::handle_ready, shared_from_this(), _1, callback)); + } } void Client::get_action(boost::function<void (Action)> callback, Actions expected_actions) { |