don't apply voted 🦔 to the in-game teams
authoralfadur
Sat, 11 Apr 2020 23:20:09 +0300
changeset 15574 0031683bfa76
parent 15573 7478568cffbe
child 15575 852682c2003f
don't apply voted 🦔 to the in-game teams
rust/hedgewars-server/src/core/room.rs
rust/hedgewars-server/src/core/server.rs
--- a/rust/hedgewars-server/src/core/room.rs	Fri Apr 10 21:58:09 2020 +0300
+++ b/rust/hedgewars-server/src/core/room.rs	Sat Apr 11 23:20:09 2020 +0300
@@ -160,10 +160,7 @@
 
     pub fn set_hedgehogs_number(&mut self, n: u8) -> Vec<String> {
         let mut names = Vec::new();
-        let teams = match self.game_info {
-            Some(ref mut info) => &mut info.original_teams,
-            None => &mut self.teams,
-        };
+        let teams = &mut self.teams;
 
         if teams.len() as u8 * n <= MAX_HEDGEHOGS_IN_ROOM {
             for (_, team) in teams.iter_mut() {
--- a/rust/hedgewars-server/src/core/server.rs	Fri Apr 10 21:58:09 2020 +0300
+++ b/rust/hedgewars-server/src/core/server.rs	Sat Apr 11 23:20:09 2020 +0300
@@ -523,7 +523,7 @@
     server: &'a mut HwServer,
     client_id: ClientId,
     room_id: RoomId,
-    is_room_removed: bool
+    is_room_removed: bool,
 }
 
 impl<'a> HwRoomControl<'a> {
@@ -534,7 +534,7 @@
                 server,
                 client_id,
                 room_id,
-                is_room_removed: false
+                is_room_removed: false,
             })
         } else {
             None