Keep hedgehog limit in sync
authoralfadur
Wed, 18 Jul 2018 02:14:32 +0300
changeset 13525 d126d9a646ac
parent 13524 5359ff75da3a
child 13526 3f69acc7e268
Keep hedgehog limit in sync
gameServer2/src/server/handlers/inroom.rs
gameServer2/src/server/room.rs
--- a/gameServer2/src/server/handlers/inroom.rs	Tue Jul 17 16:03:34 2018 +0300
+++ b/gameServer2/src/server/handlers/inroom.rs	Wed Jul 18 02:14:32 2018 +0300
@@ -99,7 +99,6 @@
         Part(Some(msg)) => server.react(client_id, vec![
             MoveToLobby(format!("part: {}", msg))]),
         Chat(msg) => {
-            
             let actions = {
                 let c = &mut server.clients[client_id];
                 let chat_msg = ChatMsg {nick: c.nick.clone(), msg};
--- a/gameServer2/src/server/room.rs	Tue Jul 17 16:03:34 2018 +0300
+++ b/gameServer2/src/server/room.rs	Wed Jul 18 02:14:32 2018 +0300
@@ -4,7 +4,8 @@
     client::{HWClient}
 };
 
-const MAX_HEDGEHOGS_IN_ROOM: u8 = 48;
+const MAX_HEDGEHOGS_IN_ROOM: u8 = 64;
+const MAX_TEAMS_IN_ROOM: u8 = 8;
 
 #[derive(Clone)]
 struct Ammo {
@@ -146,7 +147,7 @@
             protocol_number: 0,
             players_number: 0,
             default_hedgehog_number: 4,
-            team_limit: 8,
+            team_limit: MAX_TEAMS_IN_ROOM,
             ready_players_number: 0,
             teams: Vec::new(),
             config: RoomConfig::new(),