mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
comments
This commit is contained in:
parent
2c74a86170
commit
a0a75b1921
@ -270,8 +270,6 @@ pub fn handle_forced_movement(
|
|||||||
movement: ForcedMovement,
|
movement: ForcedMovement,
|
||||||
efficiency: f32,
|
efficiency: f32,
|
||||||
) {
|
) {
|
||||||
handle_orientation(data, update, efficiency);
|
|
||||||
|
|
||||||
match movement {
|
match movement {
|
||||||
ForcedMovement::Forward { strength } => {
|
ForcedMovement::Forward { strength } => {
|
||||||
if let Some(accel) = data.physics.on_ground.then_some(data.body.base_accel()) {
|
if let Some(accel) = data.physics.on_ground.then_some(data.body.base_accel()) {
|
||||||
@ -330,8 +328,6 @@ pub fn handle_orientation(data: &JoinData, update: &mut StateUpdate, efficiency:
|
|||||||
/// Updates components to move player as if theyre swimming
|
/// Updates components to move player as if theyre swimming
|
||||||
fn swim_move(data: &JoinData, update: &mut StateUpdate, efficiency: f32, submersion: f32) -> bool {
|
fn swim_move(data: &JoinData, update: &mut StateUpdate, efficiency: f32, submersion: f32) -> bool {
|
||||||
if let Some(force) = data.body.swim_thrust() {
|
if let Some(force) = data.body.swim_thrust() {
|
||||||
handle_orientation(data, update, efficiency * 0.2);
|
|
||||||
|
|
||||||
let force = efficiency * force;
|
let force = efficiency * force;
|
||||||
let mut water_accel = force / data.mass.0;
|
let mut water_accel = force / data.mass.0;
|
||||||
|
|
||||||
@ -373,8 +369,6 @@ pub fn fly_move(data: &JoinData, update: &mut StateUpdate, efficiency: f32) -> b
|
|||||||
|
|
||||||
let accel = thrust / data.mass.0;
|
let accel = thrust / data.mass.0;
|
||||||
|
|
||||||
handle_orientation(data, update, efficiency);
|
|
||||||
|
|
||||||
// Elevation control
|
// Elevation control
|
||||||
match data.body {
|
match data.body {
|
||||||
// flappy flappy
|
// flappy flappy
|
||||||
|
Loading…
Reference in New Issue
Block a user