summaryrefslogtreecommitdiff
path: root/web/dartboat_wasm.c
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-04-23 07:30:48 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-04-23 07:30:48 -0700
commitae6a9550968ea24feb512edeab06902430759e8a (patch)
tree80a690077eda004f77a912608567061b1c6c5664 /web/dartboat_wasm.c
parentd50ac287e7cc00793657422dbfa36d9c71e659be (diff)
downloaddartboat-ae6a9550968ea24feb512edeab06902430759e8a.tar.gz
dartboat-ae6a9550968ea24feb512edeab06902430759e8a.tar.xz
web: reset averages at start of match
Diffstat (limited to 'web/dartboat_wasm.c')
-rw-r--r--web/dartboat_wasm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/web/dartboat_wasm.c b/web/dartboat_wasm.c
index 0e59312..ede1b59 100644
--- a/web/dartboat_wasm.c
+++ b/web/dartboat_wasm.c
@@ -328,6 +328,8 @@ EMSCRIPTEN_KEEPALIVE void start_match() {
EM_ASM({updatePlayerName($0, $1)}, P_BOAT, state->l2->name);
update_user_rem(state->l1->rem);
update_boat_rem(state->l2->rem);
+ EM_ASM({updatePlayerAvg($0, $1)}, P_USER, 0);
+ EM_ASM({updatePlayerAvg($0, $1)}, P_BOAT, 0);
EM_ASM(clearVisits());
set_user_active();