atmosphere: remove fake buoyancy
This commit is contained in:
parent
1bf83b424f
commit
43ff6bde83
14
src/actor.rs
14
src/actor.rs
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue