gameServer2/src/server/server.rs
changeset 13520 1ee192f13456
parent 13478 d79795acaa73
child 13521 ba5211dddb21
equal deleted inserted replaced
13485:c85b324c4c2d 13520:1ee192f13456
   122 
   122 
   123     pub fn room_clients(&self, room_id: RoomId) -> Vec<ClientId> {
   123     pub fn room_clients(&self, room_id: RoomId) -> Vec<ClientId> {
   124         self.select_clients(|(_, c)| c.room_id == Some(room_id))
   124         self.select_clients(|(_, c)| c.room_id == Some(room_id))
   125     }
   125     }
   126 
   126 
   127     pub fn protocol_clients(&self, protocol: u32) -> Vec<ClientId> {
   127     pub fn protocol_clients(&self, protocol: u16) -> Vec<ClientId> {
   128         self.select_clients(|(_, c)| c.protocol_number == protocol)
   128         self.select_clients(|(_, c)| c.protocol_number == protocol)
   129     }
   129     }
   130 
   130 
   131     pub fn other_clients_in_room(&self, self_id: ClientId) -> Vec<ClientId> {
   131     pub fn other_clients_in_room(&self, self_id: ClientId) -> Vec<ClientId> {
   132         let room_id = self.clients[self_id].room_id;
   132         let room_id = self.clients[self_id].room_id;