Clean up unused things

This commit is contained in:
Wizzard 2025-03-17 15:51:47 -04:00
parent e9d197229a
commit b6300bcb0b
3 changed files with 3 additions and 31 deletions

@ -33,22 +33,6 @@ pub struct PlayerData {
impl PlayerData {
pub fn new(pos: Vec3, yaw: f32, player_type: PlayerType, has_bomb: bool, has_awp: bool,
is_scoped: bool, player_name: String, weapon_id: i16, health: u32) -> PlayerData {
PlayerData {
pos,
yaw,
player_type,
has_bomb,
has_awp,
is_scoped,
player_name,
weapon_id,
money: 0,
health
}
}
pub fn new_with_money(pos: Vec3, yaw: f32, player_type: PlayerType, has_bomb: bool, has_awp: bool,
is_scoped: bool, player_name: String, weapon_id: i16, money: i32, health: u32) -> PlayerData {
PlayerData {
pos,
@ -63,14 +47,6 @@ impl PlayerData {
health
}
}
pub fn get_pos(&self) -> &Vec3 {
&self.pos
}
pub fn get_player_name(&self) -> &str {
&self.player_name
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
@ -191,10 +167,6 @@ impl RadarData {
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 {}

@ -196,7 +196,7 @@ pub async fn run(radar_data: ArcRwlockRadarData, connector: Connector, pcileech_
entity_data.push(
EntityData::Player(
PlayerData::new_with_money(
PlayerData::new(
local_data.pos,
local_data.yaw,
PlayerType::Local,
@ -238,7 +238,7 @@ pub async fn run(radar_data: ArcRwlockRadarData, connector: Connector, pcileech_
entity_data.push(
EntityData::Player(
PlayerData::new_with_money(
PlayerData::new(
player_data.pos,
player_data.yaw,
player_type,

@ -10,7 +10,7 @@ use std::io::Write;
use tokio::sync::{RwLock, Mutex};
use tower_http::services::ServeDir;
use crate::comms::{RadarData, ArcRwlockRadarData, EntityData};
use crate::comms::{RadarData};
struct ClientState {
last_entity_count: usize,