From ae6a9550968ea24feb512edeab06902430759e8a Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Sat, 23 Apr 2022 07:30:48 -0700 Subject: web: reset averages at start of match --- web/dartboat_wasm.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'web') 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(); -- cgit v1.2.3-70-g09d2