From 35f311f779c039423fc7e2a11f98703c40201846 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Sat, 21 May 2022 02:11:04 -0700 Subject: web: show full visit log when player 3 or higher starts --- web/web_scoreboard.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web/web_scoreboard.c b/web/web_scoreboard.c index 62b4c0f..3b5993a 100644 --- a/web/web_scoreboard.c +++ b/web/web_scoreboard.c @@ -287,9 +287,11 @@ void draw_visits_dense() int np = match_num_players(); dom_set_style_property_int("--num-players", np); - // FIXME - 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 = 0; + for (int i = 0; i < np; ++i) { + if (state->legs[i]->n_visits > n_visits) + n_visits = state->legs[i]->n_visits; + } struct dom_elem **elemv = malloc( (np * 2 + 1) * (2 * n_visits + 2) * sizeof(*elemv)); -- cgit v1.2.3-70-g09d2