diff --git a/voxygen/src/session.rs b/voxygen/src/session.rs index 7670eb1b1e..ba92e95cdd 100644 --- a/voxygen/src/session.rs +++ b/voxygen/src/session.rs @@ -383,6 +383,10 @@ impl PlayState for SessionState { if global_state.singleplayer.is_none() || !global_state.singleplayer.as_ref().unwrap().is_paused() { + log::warn!( + "{}", + global_state.singleplayer.as_ref().unwrap().is_paused() + ); // Perform an in-game tick. if let Err(err) = self.tick(clock.get_avg_delta()) { global_state.info_message = diff --git a/voxygen/src/singleplayer.rs b/voxygen/src/singleplayer.rs index d2538c6bf6..28c7165148 100644 --- a/voxygen/src/singleplayer.rs +++ b/voxygen/src/singleplayer.rs @@ -57,12 +57,12 @@ impl Singleplayer { } /// Returns wether or not the server is paused - pub fn is_paused(&self) -> bool { self.paused.load(Ordering::Relaxed) } + pub fn is_paused(&self) -> bool { self.paused.load(Ordering::SeqCst) } /// Pauses if true is passed and unpauses if false (Does nothing if in that /// state already) pub fn pause(&self, state: bool) { - self.paused.load(Ordering::SeqCst); + self.paused.store(state, Ordering::SeqCst); let _ = self.sender.send(Msg::Pause(state)); } }