gameServer2/src/server/room.rs
author alfadur
Mon, 12 Mar 2018 00:59:47 +0100
changeset 13168 0e7eddfbce8a
parent 13119 1e39b8749072
child 13416 cdf69667593b
permissions -rw-r--r--
Fix minigun bullets sometimes failing to hit when shooting same thing twice in row alfadur says: “the stale collision cache is searched in, so if you shoot at same thing twice in a row, chances are it woudln't get hit”

pub type RoomId = usize;

pub struct HWRoom {
    pub id: RoomId,
    pub name: String,
    pub password: Option<String>,
    pub protocol_number: u32,
    pub ready_players_number: u8,
}

impl HWRoom {
    pub fn new(id: RoomId) -> HWRoom {
        HWRoom {
            id,
            name: String::new(),
            password: None,
            protocol_number: 0,
            ready_players_number: 0,
        }
    }
}