diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-10 00:05:04 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-10 00:05:04 -0700 |
commit | cf7b5519c257c96f426edf045b07e29e8aeb4e72 (patch) | |
tree | fdee104dcce6dc6745f514fb944d051abfb71765 /web/web_control.c | |
parent | 90b5ca5e47f0fda21f8da6cb9857a35e0f4730a3 (diff) | |
download | dartboat-cf7b5519c257c96f426edf045b07e29e8aeb4e72.tar.gz dartboat-cf7b5519c257c96f426edf045b07e29e8aeb4e72.tar.xz |
web: fix post-match undo when bot is throwing second
Diffstat (limited to 'web/web_control.c')
-rw-r--r-- | web/web_control.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; |