diff options
author | metamuffin <metamuffin@disroot.org> | 2025-06-02 18:04:20 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-06-02 18:04:20 +0200 |
commit | 8059e28bbc363dd6304cc67db69dbc573f6e0280 (patch) | |
tree | 762eecaac7c6807098e63ddb71f6b54072d0b2b3 /server | |
parent | b838981cfd164dad36f7e919238211bb87f96578 (diff) | |
download | hurrycurry-8059e28bbc363dd6304cc67db69dbc573f6e0280.tar hurrycurry-8059e28bbc363dd6304cc67db69dbc573f6e0280.tar.bz2 hurrycurry-8059e28bbc363dd6304cc67db69dbc573f6e0280.tar.zst |
send clientbound pause notification
Diffstat (limited to 'server')
-rw-r--r-- | server/protocol/src/lib.rs | 3 | ||||
-rw-r--r-- | server/src/state.rs | 2 |
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 { |