]> git.seodisparate.com - EN605.607.81.SP22_ASDM_Project/commitdiff
front-end: Minor fix related to reset button sprint_06_day_1 sprint_06_day_2
authorStephen Seo <seo.disparate@gmail.com>
Mon, 25 Apr 2022 06:19:25 +0000 (15:19 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Mon, 25 Apr 2022 06:19:25 +0000 (15:19 +0900)
front_end/src/yew_components.rs

index 88bda03b67e19d3965314c9b25f437e518edc219..ba8a73aea3229dc4a0fd03d757c718af40189c3d 100644 (file)
@@ -1228,7 +1228,7 @@ impl Component for Wrapper {
                 ctx.link().send_message(WrapperMsg::BackendTick);
             }
             WrapperMsg::BackendTick => {
-                if !self.do_backend_tick || shared.game_state.get() == GameState::default() {
+                if !self.do_backend_tick || !shared.game_state.get().is_networked_multiplayer() {
                     // disconnect id if backend tick is to be stopped
                     if let Some(id) = self.player_id.take() {
                         let function = Function::new_no_args(&format!(