aboutsummaryrefslogtreecommitdiff
path: root/server/src/state.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/state.rs')
-rw-r--r--server/src/state.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/state.rs b/server/src/state.rs
index f7bccf29..5eb4059a 100644
--- a/server/src/state.rs
+++ b/server/src/state.rs
@@ -22,7 +22,10 @@ use log::{debug, info, trace};
impl Server {
pub async fn tick_outer(&mut self, dt: f32) -> anyhow::Result<()> {
- let should_pause = self.connections.iter().all(|c| c.1 .1);
+ if self.start_pause_timer > 0. {
+ self.start_pause_timer -= dt
+ }
+ let should_pause = self.start_pause_timer > 0. || self.connections.iter().all(|c| c.1 .1);
if should_pause != self.paused {
info!("Game paused: {should_pause}");
self.paused = should_pause;