diff --git a/rust/src/game/mod.rs b/rust/src/game/mod.rs index e8300a0..1a231ac 100644 --- a/rust/src/game/mod.rs +++ b/rust/src/game/mod.rs @@ -11,10 +11,7 @@ use crate::{ bgm::{Music, MusicManager}, chat::{Chat, ChatMessage}, game::{ - commands::{ - KillCommand, ListPlayersCommand, RespawnBallCommand, register_commands, - unregister_commands, - }, + commands::{register_commands, unregister_commands}, opts::{GameOption, GameOptionValue, GameOptions}, }, map::Map, @@ -36,7 +33,7 @@ use crate::{ }, replay::{ReplayEvent, ReplayPlayback, ReplayRecorder}, team_resource::TeamResource, - ui::cli::{CliColor, Command, CommandLinePanel}, + ui::cli::CommandLinePanel, }; pub mod commands; diff --git a/rust/src/game_settings.rs b/rust/src/game_settings.rs index 49930fe..aefcd3b 100644 --- a/rust/src/game_settings.rs +++ b/rust/src/game_settings.rs @@ -1,12 +1,9 @@ -use std::{ - net::SocketAddr, - time::{Duration, SystemTime, UNIX_EPOCH}, -}; +use std::time::{Duration, SystemTime, UNIX_EPOCH}; use godot::{ classes::{ AudioServer, DisplayServer, FileAccess, InputEvent, InputEventKey, InputEventMouseButton, - InputMap, display_server::WindowMode, file_access::ModeFlags, window::Mode, + InputMap, display_server::WindowMode, file_access::ModeFlags, }, global::{Key, MouseButton}, prelude::*, diff --git a/rust/src/net/protocol.rs b/rust/src/net/protocol.rs index bc59511..063850e 100644 --- a/rust/src/net/protocol.rs +++ b/rust/src/net/protocol.rs @@ -17,7 +17,7 @@ impl NetworkManager { if let Some(peer) = &mut self.peer { match peer { - PeerKind::Client(peer, addr) => match message { + PeerKind::Client(peer, _) => match message { teanet::PeerMessage::NewConnection(connection) => { cli.bind_mut().publish_message( format!("Connected to: {}", connection.address), diff --git a/rust/src/replay.rs b/rust/src/replay.rs index b052693..8cb7c67 100644 --- a/rust/src/replay.rs +++ b/rust/src/replay.rs @@ -362,9 +362,7 @@ impl INode for ReplayPlayback { } self.telegrenades.remove(player_id); - if let Some(map) = &mut self.current_map - && let Some(player) = self.replay.players.get(player_id) - { + if let Some(map) = &mut self.current_map { if let Some(telegrenade) = map.bind_mut().spawn_replay_telegrenade( (*location).into(), (*velocity).into(), diff --git a/rust/src/ui/replay_hud.rs b/rust/src/ui/replay_hud.rs index f4cf491..b4c7a2c 100644 --- a/rust/src/ui/replay_hud.rs +++ b/rust/src/ui/replay_hud.rs @@ -1,5 +1,5 @@ use godot::{ - classes::{Control, IControl, InputEvent, Label, Slider}, + classes::{Control, IControl, Label, Slider}, prelude::*, };