Undo gravity hack and set gravity to 1G again

This commit is contained in:
Ludvig Böklin 2021-06-09 14:33:28 +02:00
parent a23a2a7b92
commit 1c58288687
3 changed files with 4 additions and 10 deletions

View File

@ -764,8 +764,8 @@ impl Drag for Body {
fn parasite_drag_coefficient(&self) -> f32 {
// Scale modifier to reduce or increase drag as needed to give bodies reasonable
// terminal velocities for the gravitational acceleration of this world
// const SCALE_MODIFIER: f32 = 0.6; // if we can eventually have 1G
const SCALE_MODIFIER: f32 = 1.1; // for 2.5G
const SCALE_MODIFIER: f32 = 0.6; // if we can eventually have 1G
// const SCALE_MODIFIER: f32 = 1.1; // for 2.5G
// Reference area and drag coefficient assumes best-case scenario of the
// orientation producing least amount of drag

View File

@ -2,7 +2,7 @@
pub const MAX_PICKUP_RANGE: f32 = 8.0;
pub const MAX_MOUNT_RANGE: f32 = 14.0;
pub const GRAVITY: f32 = 25.0;
pub const GRAVITY: f32 = 9.81;
pub const FRIC_GROUND: f32 = 0.15;
// Values for air taken from http://www-mdp.eng.cam.ac.uk/web/library/enginfo/aerothermal_dvd_only/aero/atmos/atmos.html

View File

@ -667,12 +667,6 @@ impl<'a> PhysicsData<'a> {
// players into the floor when stationary if other systems cause the server
// to lag (as observed in the 0.9 release party).
let dt = DeltaTime(read.dt.0.min(0.1));
// Hack. FIXME: Implement gravity magic proper and/or set GRAVITY to 9.81.
let custom_gravity = character_state.and_then(|cs| match cs {
CharacterState::Glide(_) => Some(9.81),
_ => None,
});
match physics_state.in_fluid {
None => {
vel.0.z -= dt.0 * GRAVITY;
@ -687,7 +681,7 @@ impl<'a> PhysicsData<'a> {
density,
mass,
&fluid,
custom_gravity.unwrap_or(GRAVITY),
GRAVITY,
);
},
}