fixed code quality

This commit is contained in:
socksonme 2021-10-29 15:01:21 +03:00
parent 584e379e40
commit 42ed5c43f5

View File

@ -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 {