mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Vec3 is copy
This commit is contained in:
parent
5b82808df0
commit
b4d5663fed
@ -99,7 +99,7 @@ impl<'a> System<'a> for Sys {
|
||||
.flatten()
|
||||
.flatten();
|
||||
|
||||
let old_vel = vel.clone();
|
||||
let old_vel = vel;
|
||||
// Integrate forces
|
||||
// Friction is assumed to be a constant dependent on location
|
||||
let friction = if physics_state.on_ground {
|
||||
@ -114,7 +114,8 @@ impl<'a> System<'a> for Sys {
|
||||
.get_key(terrain.pos_key(pos.0.map(|e| e.floor() as i32)))
|
||||
.is_some()
|
||||
{
|
||||
// this is an approximation that allows
|
||||
// this is an approximation that allows most framerates to
|
||||
// behave in a similar manner.
|
||||
(vel.0 + old_vel.0 * 4.0) * dt.0 * 0.2
|
||||
} else {
|
||||
Vec3::zero()
|
||||
|
Loading…
Reference in New Issue
Block a user