mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixed the erroneous load on pause
This commit is contained in:
parent
af21d19ff3
commit
f13314e3da
@ -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 =
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user