equal
deleted
inserted
replaced
93 room: &mut HWRoom, |
93 room: &mut HWRoom, |
94 team_names: Vec<String>, |
94 team_names: Vec<String>, |
95 is_in_game: bool, |
95 is_in_game: bool, |
96 response: &mut Response, |
96 response: &mut Response, |
97 ) { |
97 ) { |
|
98 let mut game_ended = false; |
98 if let Some(ref mut info) = room.game_info { |
99 if let Some(ref mut info) = room.game_info { |
99 for team_name in &team_names { |
100 for team_name in &team_names { |
100 info.left_teams.push(team_name.clone()); |
101 info.left_teams.push(team_name.clone()); |
101 |
102 |
102 if is_in_game { |
103 if is_in_game { |
107 .in_room(room.id) |
108 .in_room(room.id) |
108 .but_self(), |
109 .but_self(), |
109 ); |
110 ); |
110 |
111 |
111 info.teams_in_game -= 1; |
112 info.teams_in_game -= 1; |
112 if info.teams_in_game == 0 { |
|
113 //FinishRoomGame(room.id) |
|
114 } |
|
115 |
113 |
116 let remove_msg = to_engine_msg(once(b'F').chain(team_name.bytes())); |
114 let remove_msg = to_engine_msg(once(b'F').chain(team_name.bytes())); |
117 if let Some(m) = &info.sync_msg { |
115 if let Some(m) = &info.sync_msg { |
118 info.msg_log.push(m.clone()); |
116 info.msg_log.push(m.clone()); |
119 info.sync_msg = None |
117 info.sync_msg = None |