summaryrefslogtreecommitdiff
path: root/web/web_scoreboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'web/web_scoreboard.c')
-rw-r--r--web/web_scoreboard.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/web/web_scoreboard.c b/web/web_scoreboard.c
index f298dfe..62b4c0f 100644
--- a/web/web_scoreboard.c
+++ b/web/web_scoreboard.c
@@ -382,8 +382,9 @@ void draw_visits()
dom_set_content("#visits", NULL);
dom_remove_class("#visits", "dense");
- int n_visits = state->legs[0]->n_visits > state->legs[1]->n_visits ?
- state->legs[0]->n_visits : state->legs[1]->n_visits;
+ int n_visits = state->legs[0]->n_visits;
+ if (match_num_players() != 1 && state->legs[1]->n_visits > n_visits)
+ n_visits = state->legs[1]->n_visits;
struct dom_elem **elemv = malloc(7 * (n_visits + 1) * sizeof(*elemv));
int elemc = 0;
@@ -434,7 +435,7 @@ p2:
snprintf(buf, sizeof(buf), "%d", i + 1);
elemv[elemc++] = create_div(buf, "visit-n");
- if (i >= state->legs[1]->n_visits)
+ if (match_num_players() == 1 || i >= state->legs[1]->n_visits)
continue;
v = state->legs[1]->visits + i;