mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
cargo fmt
This commit is contained in:
parent
6d57169875
commit
807bd758b7
@ -410,7 +410,10 @@ impl Client {
|
||||
|
||||
// Initialize `State`
|
||||
let pools = State::pools(GameMode::Client);
|
||||
let mut state = State::client(pools, map_size_lg, world_map.default_chunk,
|
||||
let mut state = State::client(
|
||||
pools,
|
||||
map_size_lg,
|
||||
world_map.default_chunk,
|
||||
// TODO: Add frontend systems
|
||||
|dispatch_builder| {
|
||||
add_local_systems(dispatch_builder);
|
||||
@ -1803,11 +1806,7 @@ impl Client {
|
||||
|
||||
/// Execute a single client tick, handle input and update the game state by
|
||||
/// the given duration.
|
||||
pub fn tick(
|
||||
&mut self,
|
||||
inputs: ControllerInputs,
|
||||
dt: Duration,
|
||||
) -> Result<Vec<Event>, Error> {
|
||||
pub fn tick(&mut self, inputs: ControllerInputs, dt: Duration) -> Result<Vec<Event>, Error> {
|
||||
span!(_guard, "tick", "Client::tick");
|
||||
// This tick function is the centre of the Veloren universe. Most client-side
|
||||
// things are managed from here, and as such it's important that it
|
||||
|
@ -11,9 +11,7 @@ use common::{
|
||||
uid::{IdMaps, Uid},
|
||||
};
|
||||
use common_ecs::{Job, Origin, Phase, System};
|
||||
use specs::{
|
||||
shred, Entities, Entity as EcsEntity, Join, Read, ReadStorage, SystemData,
|
||||
};
|
||||
use specs::{shred, Entities, Entity as EcsEntity, Join, Read, ReadStorage, SystemData};
|
||||
|
||||
#[derive(SystemData)]
|
||||
pub struct ReadData<'a> {
|
||||
|
@ -17,8 +17,7 @@ use common_ecs::{Job, Origin, ParMode, Phase, System};
|
||||
use rand::Rng;
|
||||
use rayon::iter::ParallelIterator;
|
||||
use specs::{
|
||||
shred, Entities, LendJoin, ParJoin, Read, ReadExpect, ReadStorage,
|
||||
SystemData, WriteStorage,
|
||||
shred, Entities, LendJoin, ParJoin, Read, ReadExpect, ReadStorage, SystemData, WriteStorage,
|
||||
};
|
||||
use vek::*;
|
||||
|
||||
|
@ -22,8 +22,8 @@ use common_base::prof_span;
|
||||
use common_ecs::{Job, Origin, ParMode, Phase, System};
|
||||
use rayon::iter::ParallelIterator;
|
||||
use specs::{
|
||||
shred, Entities, Entity, LendJoin, ParJoin, Read, ReadExpect, ReadStorage,
|
||||
SystemData, WriteStorage,
|
||||
shred, Entities, Entity, LendJoin, ParJoin, Read, ReadExpect, ReadStorage, SystemData,
|
||||
WriteStorage,
|
||||
};
|
||||
|
||||
#[derive(SystemData)]
|
||||
|
@ -1,6 +1,5 @@
|
||||
use specs::{
|
||||
shred, Entities, LazyUpdate, LendJoin, Read, ReadExpect, ReadStorage,
|
||||
SystemData, WriteStorage,
|
||||
shred, Entities, LazyUpdate, LendJoin, Read, ReadExpect, ReadStorage, SystemData, WriteStorage,
|
||||
};
|
||||
|
||||
use common::{
|
||||
|
@ -9,10 +9,7 @@ use common::{
|
||||
uid::IdMaps,
|
||||
};
|
||||
use common_ecs::{Job, Origin, Phase, System};
|
||||
use specs::{
|
||||
shred, Entities, Join, Read, ReadExpect, ReadStorage, SystemData,
|
||||
WriteStorage,
|
||||
};
|
||||
use specs::{shred, Entities, Join, Read, ReadExpect, ReadStorage, SystemData, WriteStorage};
|
||||
use vek::*;
|
||||
|
||||
#[derive(SystemData)]
|
||||
|
@ -6,8 +6,8 @@ use common_base::prof_span;
|
||||
use common_ecs::{Job, Origin, Phase, System};
|
||||
use common_net::sync::InterpolatableComponent;
|
||||
use specs::{
|
||||
prelude::ParallelIterator, shred, Entities, ParJoin, Read, ReadStorage,
|
||||
SystemData, WriteStorage,
|
||||
prelude::ParallelIterator, shred, Entities, ParJoin, Read, ReadStorage, SystemData,
|
||||
WriteStorage,
|
||||
};
|
||||
|
||||
#[derive(SystemData)]
|
||||
|
@ -22,9 +22,8 @@ use common_base::{prof_span, span};
|
||||
use common_ecs::{Job, Origin, ParMode, Phase, PhysicsMetrics, System};
|
||||
use rayon::iter::ParallelIterator;
|
||||
use specs::{
|
||||
shred,
|
||||
Entities, Entity, Join, LendJoin, ParJoin, Read, ReadExpect, ReadStorage, SystemData, Write,
|
||||
WriteExpect, WriteStorage,
|
||||
shred, Entities, Entity, Join, LendJoin, ParJoin, Read, ReadExpect, ReadStorage, SystemData,
|
||||
Write, WriteExpect, WriteStorage,
|
||||
};
|
||||
use std::ops::Range;
|
||||
use vek::*;
|
||||
|
@ -17,8 +17,8 @@ use common::vol::ReadVol;
|
||||
use common_ecs::{Job, Origin, Phase, System};
|
||||
use rand::Rng;
|
||||
use specs::{
|
||||
shred, Entities, Entity as EcsEntity, Join, Read, ReadExpect, ReadStorage,
|
||||
SystemData, WriteStorage,
|
||||
shred, Entities, Entity as EcsEntity, Join, Read, ReadExpect, ReadStorage, SystemData,
|
||||
WriteStorage,
|
||||
};
|
||||
use std::time::Duration;
|
||||
use vek::*;
|
||||
|
@ -15,10 +15,7 @@ use common::{
|
||||
};
|
||||
use common_ecs::{Job, Origin, Phase, System};
|
||||
use rand::Rng;
|
||||
use specs::{
|
||||
shred, Entities, Join, LendJoin, Read, ReadStorage, SystemData,
|
||||
WriteStorage,
|
||||
};
|
||||
use specs::{shred, Entities, Join, LendJoin, Read, ReadStorage, SystemData, WriteStorage};
|
||||
use vek::*;
|
||||
|
||||
#[derive(SystemData)]
|
||||
|
@ -12,8 +12,7 @@ use common::{
|
||||
};
|
||||
use common_ecs::{Job, Origin, Phase, System};
|
||||
use specs::{
|
||||
shred, Entities, LendJoin, Read, ReadExpect, ReadStorage, SystemData,
|
||||
Write, WriteStorage,
|
||||
shred, Entities, LendJoin, Read, ReadExpect, ReadStorage, SystemData, Write, WriteStorage,
|
||||
};
|
||||
|
||||
const ENERGY_REGEN_ACCEL: f32 = 1.0;
|
||||
|
@ -26,10 +26,7 @@ use common::{
|
||||
terrain::TerrainGrid,
|
||||
uid::{IdMaps, Uid},
|
||||
};
|
||||
use specs::{
|
||||
shred, Entities, Entity as EcsEntity, Read, ReadExpect, ReadStorage,
|
||||
SystemData,
|
||||
};
|
||||
use specs::{shred, Entities, Entity as EcsEntity, Read, ReadExpect, ReadStorage, SystemData};
|
||||
|
||||
// TODO: Move rtsim back into AgentData after rtsim2 when it has a separate
|
||||
// crate
|
||||
|
Loading…
Reference in New Issue
Block a user