aboutsummaryrefslogtreecommitdiff
path: root/server/src/entity/book.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-09-25 23:08:28 +0200
committermetamuffin <metamuffin@disroot.org>2024-09-25 23:08:39 +0200
commitc8d034a49efa8a588a849406bf6841659c49497e (patch)
treef03ff7da490ba653a0fd74ea009c7f740967af93 /server/src/entity/book.rs
parentb020cb8a0c1cb759c2c43e2f3bc9c819f8a9c3da (diff)
downloadhurrycurry-c8d034a49efa8a588a849406bf6841659c49497e.tar
hurrycurry-c8d034a49efa8a588a849406bf6841659c49497e.tar.bz2
hurrycurry-c8d034a49efa8a588a849406bf6841659c49497e.tar.zst
fix book entity opening book for everyone; fix #166
Diffstat (limited to 'server/src/entity/book.rs')
-rw-r--r--server/src/entity/book.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/entity/book.rs b/server/src/entity/book.rs
index 5833a871..70197764 100644
--- a/server/src/entity/book.rs
+++ b/server/src/entity/book.rs
@@ -31,7 +31,9 @@ impl Entity for Book {
_player: PlayerID,
) -> Result<bool, TrError> {
if pos == Some(self.0) {
- c.packet_out.push_back(PacketC::Menu(Menu::Book));
+ if let Some(r) = c.replies {
+ r.push(PacketC::Menu(Menu::Book));
+ }
return Ok(true);
}
Ok(false)