From 8ef6d187b48cfe07d9f62bfa2227df612b4a3960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atle=20Hellvik=20Havs=C3=B8?= Date: Wed, 15 Dec 2010 11:24:04 +0100 Subject: Fixed score being sent when ron. --- server/game.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/game.cpp b/server/game.cpp index 4816490..819336a 100644 --- a/server/game.cpp +++ b/server/game.cpp @@ -333,6 +333,7 @@ void Game::round_end(Endcondition end) { msg[count_player]->total_han = msg[count_player]->total_fu = msg[count_player]->won = msg[count_player]->score[count_player].won = 0; for(int i = 0; i < 4; i++) { msg[count_player]->score[count_player + i].score = players[count_player + i].get_state().score; + msg[count_player]->score[count_player + i].won = 0; } switch(end) { @@ -388,8 +389,13 @@ void Game::round_end(Endcondition end) { if(current_player + i == round_num) { msg[count_player]->won = player.won_value.ron_east(); + msg[count_player]->score[current_player + i].won = player.won_value.ron_east(); + msg[count_player]->score[current_player].won = -(player.won_value.ron_east()); + } else { msg[count_player]->won = player.won_value.ron(); + msg[count_player]->score[current_player + i].won = player.won_value.ron(); + msg[count_player]->score[current_player].won = -(player.won_value.ron()); } // TODO: Support multiple wins. -- cgit v1.2.3