mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Clippy tweaks for latest PR and multiplayer fixes
This commit is contained in:
@@ -46,7 +46,7 @@ impl CubeLocationsParser {
|
||||
let target_x = point.0 as f32;
|
||||
let target_y = point.1 as f32;
|
||||
let target_z = point.2 as f32;
|
||||
let mut relevant_cubes: Vec<(f32, CubeLocationInfo)> = cubes.into_iter()
|
||||
let mut relevant_cubes: Vec<(f32, CubeLocationInfo)> = cubes.iter()
|
||||
.filter(|x| x.id == locations_of_id)
|
||||
.map(|cube| {
|
||||
let distance = (
|
||||
|
||||
@@ -9,6 +9,7 @@ fn db_to_impl(client_emu: &oj_rc_database::schema::multiplayer_game_player::Clie
|
||||
}
|
||||
|
||||
impl UserData {
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub(super) async fn generate_fake_players_data(
|
||||
&self,
|
||||
_guid: i64,
|
||||
@@ -57,6 +58,7 @@ impl UserData {
|
||||
Ok(fakes)
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub(super) async fn generate_forced_fake_players_data(
|
||||
&self,
|
||||
guid: i64,
|
||||
@@ -77,6 +79,7 @@ impl UserData {
|
||||
).await
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub(super) async fn generate_filler_players_data(
|
||||
&self,
|
||||
guid: i64,
|
||||
|
||||
@@ -265,6 +265,7 @@ pub trait LobbyUser {
|
||||
fn user_id(&self) -> i32;
|
||||
async fn player_data(&self, cpu_counter: &crate::cubes::CpuListParser) -> Result<crate::data::player_data::PlayerData, polariton_server::operations::SimpleOpError>;
|
||||
async fn team_chooser(&self, game: &GameDescriptor) -> super::TeamChooser;
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
async fn start_game(&self, game: GameDescriptor, players: Vec<PlayerLobbyDescriptor>, factory: &dyn oj_rc_factory::VehicleFactoryAdapter, cpu_counter: &crate::cubes::CpuListParser, weapon_lister: &crate::cubes::WeaponListParser, team_chooser: &super::TeamChooser, missing_players: usize) -> Result<FakePlayers, polariton_server::operations::SimpleOpError>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user