Add: Network compression (Attempts to fix stutter when sharing the radar)

This commit is contained in:
2025-03-15 23:36:47 -04:00
parent 3d0b960753
commit ffa2979da3
6 changed files with 556 additions and 535 deletions

View File

@@ -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 {}