summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtle Hellvik Havsø <atle@havso.net>2010-12-15 11:24:04 +0100
committerAtle Hellvik Havsø <atle@havso.net>2010-12-15 11:24:04 +0100
commit8ef6d187b48cfe07d9f62bfa2227df612b4a3960 (patch)
treec45a319883f1389f20eab8eb545352056c36fa1a
parentb28b3c5b8ddb6d73c1e7745d15ea328326a544f9 (diff)
Fixed score being sent when ron.
-rw-r--r--server/game.cpp6
1 files changed, 6 insertions, 0 deletions
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.