aboutsummaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/protocol/src/lib.rs3
-rw-r--r--server/src/state.rs2
2 files changed, 5 insertions, 0 deletions
diff --git a/server/protocol/src/lib.rs b/server/protocol/src/lib.rs
index 7c815254..4f0d5d67 100644
--- a/server/protocol/src/lib.rs
+++ b/server/protocol/src/lib.rs
@@ -231,6 +231,9 @@ pub enum PacketC {
dir: Vec2,
boost: bool,
},
+ Pause {
+ state: bool,
+ },
MoveItem {
from: ItemLocation,
to: ItemLocation,
diff --git a/server/src/state.rs b/server/src/state.rs
index 53ca3b42..a509a3bd 100644
--- a/server/src/state.rs
+++ b/server/src/state.rs
@@ -27,6 +27,8 @@ impl Server {
info!("Game paused: {}", should_pause);
self.paused = should_pause;
for p in self.game.players.keys() {
+ self.packet_out
+ .push_back(PacketC::Pause { state: self.paused });
self.packet_out.push_back(PacketC::ServerHint {
position: None,
message: if self.paused {