mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
fixed code quality
This commit is contained in:
parent
584e379e40
commit
42ed5c43f5
@ -2,8 +2,8 @@ use common::{
|
|||||||
comp::{
|
comp::{
|
||||||
body::ship::figuredata::{VoxelCollider, VOXEL_COLLIDER_MANIFEST},
|
body::ship::figuredata::{VoxelCollider, VOXEL_COLLIDER_MANIFEST},
|
||||||
fluid_dynamics::{Fluid, LiquidKind, Wings},
|
fluid_dynamics::{Fluid, LiquidKind, Wings},
|
||||||
Body, CharacterState, Collider, Density, Mass, Mounting, Ori, PhysicsState,
|
Body, CharacterState, Collider, Density, Mass, Mounting, Ori, PhysicsState, Pos,
|
||||||
Pos, PosVelOriDefer, PreviousPhysCache, Projectile, Scale, Stats, Sticky, Vel,
|
PosVelOriDefer, PreviousPhysCache, Projectile, Scale, Stats, Sticky, Vel,
|
||||||
},
|
},
|
||||||
consts::{AIR_DENSITY, FRIC_GROUND, GRAVITY},
|
consts::{AIR_DENSITY, FRIC_GROUND, GRAVITY},
|
||||||
event::{EventBus, ServerEvent},
|
event::{EventBus, ServerEvent},
|
||||||
@ -87,10 +87,7 @@ fn integrate_forces(
|
|||||||
vel
|
vel
|
||||||
}
|
}
|
||||||
|
|
||||||
fn calc_z_limit(
|
fn calc_z_limit(char_state_maybe: Option<&CharacterState>, collider: &Collider) -> (f32, f32) {
|
||||||
char_state_maybe: Option<&CharacterState>,
|
|
||||||
collider: &Collider,
|
|
||||||
) -> (f32, f32) {
|
|
||||||
let modifier = if char_state_maybe.map_or(false, |c_s| c_s.is_dodge() || c_s.is_glide()) {
|
let modifier = if char_state_maybe.map_or(false, |c_s| c_s.is_dodge() || c_s.is_glide()) {
|
||||||
0.5
|
0.5
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user