fix(web client): show dice animation & sound only once

This commit is contained in:
Henri Bourcereau 2026-05-05 17:49:00 +02:00
parent 9755ab1d41
commit 8f40304f41
4 changed files with 38 additions and 6 deletions

View file

@ -47,6 +47,7 @@ pub async fn run_local_bot_game(
my_scored_event: None,
opp_scored_event: None,
last_moves: None,
suppress_dice_anim: false,
}));
use futures::StreamExt;
@ -73,6 +74,7 @@ pub async fn run_local_bot_game(
my_scored_event: scored,
opp_scored_event: opp_scored,
last_moves: compute_last_moves(&prev_vs, &vs, true),
suppress_dice_anim: false,
}));
}
Some(NetCommand::PlayVsBot) => return true,
@ -102,6 +104,7 @@ pub async fn run_local_bot_game(
my_scored_event: None,
opp_scored_event: None,
last_moves: compute_last_moves(&delta_prev_vs, &vs, false),
suppress_dice_anim: false,
},
pending,
screen,
@ -220,6 +223,7 @@ pub fn push_or_show(
});
screen.set(Screen::Playing(GameUiState {
last_moves: None,
suppress_dice_anim: true,
..new_state
}));
} else {