From cf7b5519c257c96f426edf045b07e29e8aeb4e72 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Tue, 10 May 2022 00:05:04 -0700 Subject: web: fix post-match undo when bot is throwing second --- web/web_control.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'web') diff --git a/web/web_control.c b/web/web_control.c index 2890308..4495d51 100644 --- a/web/web_control.c +++ b/web/web_control.c @@ -200,7 +200,11 @@ void user_undo() l->rem += v->points; memset(v, 0, sizeof(*v)); - if (state->mode == M_PVC && state->legs[1]->n_visits > l->n_visits) { + if (state->mode == M_PVC && + ((match_opts->throws_first == 1 && + state->legs[1]->n_visits > l->n_visits) || + (match_opts->throws_first == 2 && + state->legs[1]->n_visits > l->n_visits + 1))) { struct leg *bl = state->legs[1]; bl->rem += bl->visits[--bl->n_visits].points; ++state->boat_undone; -- cgit v1.2.3-70-g09d2