summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-04-24 00:59:42 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-04-24 00:59:42 -0700
commit6d8ae1a15e5c7012529b556b8a4d47e295a70b8a (patch)
tree4ff4704f8804dc888c09379c841f78b5e509cc00 /web
parent5c855b503ea7e6d90129ac76db2c35c73b61cc34 (diff)
downloaddartboat-6d8ae1a15e5c7012529b556b8a4d47e295a70b8a.tar.gz
dartboat-6d8ae1a15e5c7012529b556b8a4d47e295a70b8a.tar.xz
web: display user as active when undoing after bot win
Diffstat (limited to 'web')
-rw-r--r--web/dartboat_wasm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/web/dartboat_wasm.c b/web/dartboat_wasm.c
index ceed714..d18cd12 100644
--- a/web/dartboat_wasm.c
+++ b/web/dartboat_wasm.c
@@ -282,6 +282,9 @@ EMSCRIPTEN_KEEPALIVE bool user_undo() {
switch_active_user();
}
+ if (state->mode == M_PVC)
+ EM_ASM({setPlayerActive($0)}, state->active_p);
+
struct leg *l = state->active_l;
struct visit *v = l->visits + --l->n_visits;
l->rem += v->points;