author | Wuzzy <Wuzzy2@mail.ru> |
Tue, 17 Jul 2018 21:17:33 +0200 | |
changeset 13506 | bdac56fb6f1a |
parent 13450 | d79795acaa73 |
child 13486 | 1ee192f13456 |
permissions | -rw-r--r-- |
13450 | 1 |
use super::coretypes::ClientId; |
12128 | 2 |
|
3 |
pub struct HWClient { |
|
13119
1e39b8749072
separated the server logic from all the async io mess.
alfadur
parents:
12853
diff
changeset
|
4 |
pub id: ClientId, |
12852 | 5 |
pub room_id: Option<usize>, |
12141 | 6 |
pub nick: String, |
12146
8d8fb85bc09c
SendAllButMe action, list all clients in lobby in LobbyJoined message to newcomers
unc0rr
parents:
12144
diff
changeset
|
7 |
pub protocol_number: u32, |
13447 | 8 |
pub is_admin: bool, |
12147 | 9 |
pub is_master: bool, |
10 |
pub is_ready: bool, |
|
13423 | 11 |
pub is_in_game: bool, |
13419 | 12 |
pub teams_in_game: u8, |
13423 | 13 |
pub team_indices: Vec<u8>, |
13419 | 14 |
pub clan: Option<u8>, |
12147 | 15 |
pub is_joined_mid_game: bool, |
12128 | 16 |
} |
17 |
||
18 |
impl HWClient { |
|
13119
1e39b8749072
separated the server logic from all the async io mess.
alfadur
parents:
12853
diff
changeset
|
19 |
pub fn new(id: ClientId) -> HWClient { |
12128 | 20 |
HWClient { |
13119
1e39b8749072
separated the server logic from all the async io mess.
alfadur
parents:
12853
diff
changeset
|
21 |
id, |
12146
8d8fb85bc09c
SendAllButMe action, list all clients in lobby in LobbyJoined message to newcomers
unc0rr
parents:
12144
diff
changeset
|
22 |
room_id: None, |
12141 | 23 |
nick: String::new(), |
12146
8d8fb85bc09c
SendAllButMe action, list all clients in lobby in LobbyJoined message to newcomers
unc0rr
parents:
12144
diff
changeset
|
24 |
protocol_number: 0, |
13447 | 25 |
is_admin: false, |
12147 | 26 |
is_master: false, |
27 |
is_ready: false, |
|
13423 | 28 |
is_in_game: false, |
13419 | 29 |
teams_in_game: 0, |
13423 | 30 |
team_indices: Vec::new(), |
13419 | 31 |
clan: None, |
12147 | 32 |
is_joined_mid_game: false, |
12128 | 33 |
} |
34 |
} |
|
13119
1e39b8749072
separated the server logic from all the async io mess.
alfadur
parents:
12853
diff
changeset
|
35 |
} |