diff options
Diffstat (limited to 'server/src/state.rs')
| -rw-r--r-- | server/src/state.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/server/src/state.rs b/server/src/state.rs index 70c5b7f1..533c5a0c 100644 --- a/server/src/state.rs +++ b/server/src/state.rs @@ -20,7 +20,7 @@ use crate::{ server::{AnnounceState, ConnectionData, GameServerExt, Server}, }; use anyhow::Result; -use hurrycurry_data::build_data; +use hurrycurry_data::build_gamedata; use hurrycurry_locale::{TrError, tre, trm}; use hurrycurry_protocol::{KEEPALIVE_INTERVAL, Menu, Message, PacketC, PacketS, PlayerID, VERSION}; use log::{debug, info, trace, warn}; @@ -76,7 +76,7 @@ impl Server { } if let Some((name, timer)) = r { self.scoreboard.save()?; - self.load(build_data(&self.config.data_path, &name, true)?, timer); + self.load(build_gamedata(&self.config.data_path, &name, true)?, timer); } } @@ -128,6 +128,12 @@ impl Server { supports_bincode: true, }, ); + init.insert( + 1, + PacketC::ServerData { + data: self.data.clone(), + }, + ); self.connections.insert( id, ConnectionData { @@ -242,7 +248,7 @@ impl Server { }) .ok(); self.load( - build_data(&self.config.data_path, &self.config.lobby, true) + build_gamedata(&self.config.data_path, &self.config.lobby, true) .map_err(|m| tre!("s.error.map_load", s = format!("{m}")))?, None, ); |