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