add data for triggerbot
This commit is contained in:
10
src/comms.rs
10
src/comms.rs
@@ -77,13 +77,16 @@ pub struct RadarData {
|
||||
#[serde(rename(serialize = "entityData"))]
|
||||
player_data: Vec<EntityData>,
|
||||
|
||||
#[serde(rename = "triggerbot_shoot")]
|
||||
triggerbot_shoot: bool,
|
||||
|
||||
//#[serde(rename(serialize = "localYaw"))]
|
||||
//local_yaw: f32,
|
||||
}
|
||||
|
||||
impl RadarData {
|
||||
pub fn new(ingame: bool, map_name: String, player_data: Vec<EntityData>, freq: usize, bomb_planted: bool, bomb_cannot_defuse: bool, bomb_defuse_timeleft: f32, bomb_exploded: bool, bomb_being_defused: bool, bomb_defuse_length: f32, bomb_defuse_end: f32) -> RadarData {
|
||||
RadarData { ingame, map_name, player_data, freq, bomb_planted, bomb_can_defuse: bomb_cannot_defuse, bomb_defuse_timeleft, bomb_exploded, bomb_being_defused, bomb_defuse_length, bomb_defuse_end }
|
||||
pub fn new(ingame: bool, map_name: String, player_data: Vec<EntityData>, freq: usize, bomb_planted: bool, bomb_cannot_defuse: bool, bomb_defuse_timeleft: f32, bomb_exploded: bool, bomb_being_defused: bool, bomb_defuse_length: f32, bomb_defuse_end: f32, triggerbot_shoot: bool,) -> RadarData {
|
||||
RadarData { ingame, map_name, player_data, freq, bomb_planted, bomb_can_defuse: bomb_cannot_defuse, bomb_defuse_timeleft, bomb_exploded, bomb_being_defused, bomb_defuse_length, bomb_defuse_end, triggerbot_shoot }
|
||||
}
|
||||
|
||||
/// Returns empty RadarData, it's also the same data that gets sent to clients when not ingame
|
||||
@@ -99,7 +102,8 @@ impl RadarData {
|
||||
bomb_exploded: false,
|
||||
bomb_being_defused: false,
|
||||
bomb_defuse_length: 0.0,
|
||||
bomb_defuse_end: 0.0
|
||||
bomb_defuse_end: 0.0,
|
||||
triggerbot_shoot: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user