diff --git a/Cargo.lock b/Cargo.lock index d0fc49de56..c36ba62d0c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5473,7 +5473,6 @@ dependencies = [ "hashbrown", "image", "indexmap", - "inline_tweak", "lazy_static", "num-derive", "num-traits", @@ -5574,7 +5573,6 @@ version = "0.9.0" dependencies = [ "hashbrown", "indexmap", - "inline_tweak", "ordered-float 2.1.1", "rand 0.8.3", "rayon", diff --git a/common/Cargo.toml b/common/Cargo.toml index ea560c58c5..8c3ef5d6c9 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -15,7 +15,7 @@ default = ["simd"] [dependencies] common-base = { package = "veloren-common-base", path = "base" } -inline_tweak = "1.0.8" +# inline_tweak = "1.0.8" # Serde serde = { version = "1.0.110", features = ["derive", "rc"] } diff --git a/common/src/comp/fluid_dynamics.rs b/common/src/comp/fluid_dynamics.rs index 1617b08445..59bee53e94 100644 --- a/common/src/comp/fluid_dynamics.rs +++ b/common/src/comp/fluid_dynamics.rs @@ -146,7 +146,8 @@ impl Body { if ar > 25.0 { panic!( "Aerodynamic lift calculation does not work for aspect ratios \ - > 25" + > 25. Either decrease span length or increase chord length. \ + The formula for AR is `span^2 / (pi * span/2 * chord/2)`" ); }; // Oswald's efficiency factor (empirically derived--very magical) @@ -275,11 +276,10 @@ fn angle_of_attack(ori: &Ori, rel_flow_dir: &Dir) -> f32 { pub fn lift_coefficient(aspect_ratio: f32, planform_area: f32, aoa: f32) -> f32 { let aoa_abs = aoa.abs(); let stall_angle = PI * 0.1; - inline_tweak::tweak!(1.0) - * planform_area + planform_area * if aoa_abs < stall_angle { lift_slope(aspect_ratio, None) * aoa - } else if inline_tweak::tweak!(true) { + } else { // This is when flow separation and turbulence starts to kick in. // Going to just make something up (based on some data), as the alternative is // to just throw your hands up and return 0 @@ -294,8 +294,6 @@ pub fn lift_coefficient(aspect_ratio: f32, planform_area: f32, aoa: f32) -> f32 // let's just say lift goes down linearly again until we're at 90° Lerp::lerp(c_l_max, 0.0, (aoa_abs - deg_45) / deg_45) * aoa_s } - } else { - 0.0 } } diff --git a/common/src/states/glide.rs b/common/src/states/glide.rs index 46499036fc..f09c321302 100644 --- a/common/src/states/glide.rs +++ b/common/src/states/glide.rs @@ -55,8 +55,8 @@ impl CharacterBehavior for Data { mv_dir.y, Lerp::lerp_unclamped( 0.0, - data.inputs.look_dir.z + inline_tweak::tweak!(0.3), - mv_dir.magnitude_squared() * inline_tweak::tweak!(2.0), + data.inputs.look_dir.z + 0.3, + mv_dir.magnitude_squared() * 2.0, ), ) }) diff --git a/common/src/states/glide_wield.rs b/common/src/states/glide_wield.rs index 780af50e36..0807710f45 100644 --- a/common/src/states/glide_wield.rs +++ b/common/src/states/glide_wield.rs @@ -27,11 +27,7 @@ impl CharacterBehavior for Data { .try_change_by(-energy_cost, EnergySource::Glide) .is_ok() { - update.character = CharacterState::Glide(glide::Data::new( - inline_tweak::tweak!(10.0), - inline_tweak::tweak!(1.0), - *data.ori, - )); + update.character = CharacterState::Glide(glide::Data::new(10.0, 0.6, *data.ori)); } else { update.energy.set_to(0, EnergySource::Glide); update.character = CharacterState::Idle; diff --git a/common/systems/Cargo.toml b/common/systems/Cargo.toml index 4ed9710b23..f9bed018ce 100644 --- a/common/systems/Cargo.toml +++ b/common/systems/Cargo.toml @@ -31,4 +31,4 @@ slab = "0.4.2" specs = { git = "https://github.com/amethyst/specs.git", features = ["serde", "storage-event-control", "derive"], rev = "5a9b71035007be0e3574f35184acac1cd4530496" } # Tweak running code -inline_tweak = { version = "1.0.8", features = ["release_tweak"] } +# inline_tweak = { version = "1.0.8", features = ["release_tweak"] } diff --git a/common/systems/src/phys.rs b/common/systems/src/phys.rs index 10c7eaf65c..c83d6861e9 100644 --- a/common/systems/src/phys.rs +++ b/common/systems/src/phys.rs @@ -81,8 +81,7 @@ fn integrate_forces( // Hydrostatic/aerostatic forces // modify gravity to account for the effective density as a result of buoyancy - let down_force = - dt.0 * inline_tweak::tweak!(1.0) * gravity * (density.0 - fluid_density.0) / density.0; + let down_force = dt.0 * gravity * (density.0 - fluid_density.0) / density.0; vel.0.z -= down_force; vel