send 🦔 on round end
authoralfadur
Tue, 14 Jan 2020 01:40:23 +0300
changeset 15544 77551d5e0a3b
parent 15543 02f648f7cbe1
child 15545 c1a2575bc446
send 🦔 on round end
rust/hedgewars-server/src/handlers/common.rs
--- a/rust/hedgewars-server/src/handlers/common.rs	Tue Jan 14 01:30:03 2020 +0300
+++ b/rust/hedgewars-server/src/handlers/common.rs	Tue Jan 14 01:40:23 2020 +0300
@@ -611,9 +611,14 @@
             .map(|name| TeamRemove(name.clone()).send_all().in_room(room.id)),
     );
 
-    for client_id in result.joined_mid_game_clients {
-        super::common::get_room_config(room, Destination::ToId(client_id), response);
+    let midgame_destination = Destination::ToIds(result.joined_mid_game_clients);
+    for (_, team) in &room.teams {
+        response.add(
+            HedgehogsNumber(team.name.clone(), team.hedgehogs_number)
+                .send_to_destination(midgame_destination.clone()),
+        );
     }
+    super::common::get_room_config(room, midgame_destination.clone(), response);
 
     if !result.unreadied_nicks.is_empty() {
         response.add(