gameServer2/src/server/client.rs
changeset 13534 662f7df89d06
parent 13527 282e5e54386f
child 13803 4664da990556
equal deleted inserted replaced
13533:c8b626b0a3ad 13534:662f7df89d06
     5         const IS_ADMIN = 0b0000_0001;
     5         const IS_ADMIN = 0b0000_0001;
     6         const IS_MASTER = 0b0000_0010;
     6         const IS_MASTER = 0b0000_0010;
     7         const IS_READY = 0b0000_0100;
     7         const IS_READY = 0b0000_0100;
     8         const IS_IN_GAME = 0b0000_1000;
     8         const IS_IN_GAME = 0b0000_1000;
     9         const IS_JOINED_MID_GAME = 0b0001_0000;
     9         const IS_JOINED_MID_GAME = 0b0001_0000;
       
    10 
       
    11         const NONE = 0b0000_0000;
       
    12         const DEFAULT = Self::NONE.bits;
    10     }
    13     }
    11 }
    14 }
    12 
    15 
    13 pub struct HWClient {
    16 pub struct HWClient {
    14     pub id: ClientId,
    17     pub id: ClientId,
    26         HWClient {
    29         HWClient {
    27             id,
    30             id,
    28             room_id: None,
    31             room_id: None,
    29             nick: String::new(),
    32             nick: String::new(),
    30             protocol_number: 0,
    33             protocol_number: 0,
    31             flags: ClientFlags::empty(),
    34             flags: ClientFlags::DEFAULT,
    32             teams_in_game: 0,
    35             teams_in_game: 0,
    33             team_indices: Vec::new(),
    36             team_indices: Vec::new(),
    34             clan: None,
    37             clan: None,
    35         }
    38         }
    36     }
    39     }