atmosphere: remove fake buoyancy

This commit is contained in:
yuni 2024-11-28 04:41:04 +01:00
parent 1bf83b424f
commit 43ff6bde83

View file

@ -1186,13 +1186,13 @@ fn handle_atmosphere(
reset_player_gauges = false;
}
if distance < atmo.r_inner {
let outward = (pos.0 - atmo_pos.0).normalize();
// depth is 0.0 on "surface" and 1.0 at center
let depth = ((atmo.r_inner - distance) / atmo.r_inner).clamp(0.0, 1.0);
let buoyancy = outward * depth.powf(4.0) * dt * 100_000.0;
v.0 += buoyancy;
}
// if distance < atmo.r_inner {
// let outward = (pos.0 - atmo_pos.0).normalize();
// // depth is 0.0 on "surface" and 1.0 at center
// let depth = ((atmo.r_inner - distance) / atmo.r_inner).clamp(0.0, 1.0);
// let buoyancy = outward * depth.powf(4.0) * dt * 100_000.0;
// v.0 += buoyancy;
// }
continue; // max. 1 atmosphere
}