rust/hedgewars-server/src/handlers/common.rs
changeset 15558 a798e6441a36
parent 15557 3f6a7a867040
child 15562 479911540e17
--- a/rust/hedgewars-server/src/handlers/common.rs	Tue Dec 31 04:42:20 2019 +0300
+++ b/rust/hedgewars-server/src/handlers/common.rs	Sat Jan 04 01:39:13 2020 +0300
@@ -195,7 +195,7 @@
             .send_self(),
         );
 
-        for team in info.client_teams(client.id) {
+        for team in room.client_teams(client.id) {
             response.add(
                 ForwardEngineMessage(vec![to_engine_msg(once(b'G').chain(team.name.bytes()))])
                     .send_all()
@@ -372,12 +372,7 @@
 }
 
 pub fn get_room_teams(room: &HwRoom, to_client: ClientId, response: &mut Response) {
-    let current_teams = match room.game_info {
-        Some(ref info) => &info.teams_at_start,
-        None => &room.teams,
-    };
-
-    get_teams(current_teams.iter().map(|(_, t)| t), to_client, response);
+    get_teams(room.teams.iter().map(|(_, t)| t), to_client, response);
 }
 
 pub fn get_room_flags(