diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/bot/src/algos/customer.rs | 22 | ||||
-rw-r--r-- | server/src/server.rs | 2 | ||||
-rw-r--r-- | server/src/state.rs | 2 |
3 files changed, 12 insertions, 14 deletions
diff --git a/server/bot/src/algos/customer.rs b/server/bot/src/algos/customer.rs index 716897f7..61a79dbc 100644 --- a/server/bot/src/algos/customer.rs +++ b/server/bot/src/algos/customer.rs @@ -237,18 +237,18 @@ impl BotAlgo for Customer { player: me, pos: None, }); - packets.push(PacketS::ApplyScore(Score { - demands_completed: 1, - points: demand.points, - ..Default::default() - })); - info!("{me:?} -> exiting"); - *self = Customer::Exiting { path }; - return BotInput { - extra: packets, - ..Default::default() - }; } + packets.push(PacketS::ApplyScore(Score { + demands_completed: 1, + points: demand.points, + ..Default::default() + })); + info!("{me:?} -> exiting"); + *self = Customer::Exiting { path }; + return BotInput { + extra: packets, + ..Default::default() + }; } } BotInput { diff --git a/server/src/server.rs b/server/src/server.rs index 2f93246d..43f2a59f 100644 --- a/server/src/server.rs +++ b/server/src/server.rs @@ -37,7 +37,6 @@ use std::{ pub struct ServerState { pub data: Arc<Serverdata>, pub entities: Entities, - pub lobby: bool, pub player_id_counter: PlayerID, pub score_changed: bool, pub packet_loopback: VecDeque<PacketS>, @@ -215,7 +214,6 @@ impl GameServerExt for Game { impl ServerState { pub fn new() -> Self { Self { - lobby: false, data: Serverdata::default().into(), entities: vec![], player_id_counter: PlayerID(1), diff --git a/server/src/state.rs b/server/src/state.rs index f6304db5..20a57b9d 100644 --- a/server/src/state.rs +++ b/server/src/state.rs @@ -185,7 +185,7 @@ impl State { } } - if server.count_chefs() <= 0 && !server.state.lobby { + if server.count_chefs() <= 0 && !server.game.lobby { self.tx .send(PacketC::ServerMessage { text: "Game was aborted automatically due to a lack of players".to_string(), |