Add: Network compression (Attempts to fix stutter when sharing the radar)
This commit is contained in:
16
src/comms.rs
16
src/comms.rs
@@ -58,6 +58,14 @@ impl PlayerData {
|
||||
money
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_pos(&self) -> &Vec3 {
|
||||
&self.pos
|
||||
}
|
||||
|
||||
pub fn get_player_name(&self) -> &str {
|
||||
&self.player_name
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
@@ -174,6 +182,14 @@ impl RadarData {
|
||||
money_reveal_enabled: false
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_entities(&self) -> &Vec<EntityData> {
|
||||
&self.player_data
|
||||
}
|
||||
|
||||
pub fn set_entities(&mut self, entities: Vec<EntityData>) {
|
||||
self.player_data = entities;
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for RadarData {}
|
||||
|
||||
Reference in New Issue
Block a user