aboutsummaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-08-19 15:34:50 +0200
committermetamuffin <metamuffin@disroot.org>2024-08-19 15:34:53 +0200
commit32d268abba60d2bfee877b7c5ee2e0d0c4e91565 (patch)
treee5543b36cb981e5be93ba06e21ab988560e0bd47 /server/src
parent06508575d4e6e2deb04886058fb40a2e92e105f7 (diff)
downloadhurrycurry-32d268abba60d2bfee877b7c5ee2e0d0c4e91565.tar
hurrycurry-32d268abba60d2bfee877b7c5ee2e0d0c4e91565.tar.bz2
hurrycurry-32d268abba60d2bfee877b7c5ee2e0d0c4e91565.tar.zst
remove duplicated lobby flag. fixes lobby abort bug
Diffstat (limited to 'server/src')
-rw-r--r--server/src/server.rs2
-rw-r--r--server/src/state.rs2
2 files changed, 1 insertions, 3 deletions
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(),