diff options
| author | mat <git@matdoes.dev> | 2025-03-20 03:30:57 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-03-20 03:30:57 +0000 |
| commit | 5c7332b4692986f8c0ca969d79a6eb39feca686a (patch) | |
| tree | c488461f11ee16c6e002f2ee116046b823e2971c /azalea-entity/src | |
| parent | 13d5cbed1fed1695c28dc1bf1c11b24c68819970 (diff) | |
| download | azalea-drasl-5c7332b4692986f8c0ca969d79a6eb39feca686a.tar.xz | |
add Event::Spawn
Diffstat (limited to 'azalea-entity/src')
| -rw-r--r-- | azalea-entity/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea-entity/src/lib.rs b/azalea-entity/src/lib.rs index 32b0a19f..88a1cfff 100644 --- a/azalea-entity/src/lib.rs +++ b/azalea-entity/src/lib.rs @@ -50,7 +50,7 @@ pub fn move_relative( pub fn input_vector(direction: &LookDirection, speed: f32, acceleration: &Vec3) -> Vec3 { let distance = acceleration.length_squared(); if distance < 1.0E-7 { - return Vec3::default(); + return Vec3::ZERO; } let acceleration = if distance > 1.0 { acceleration.normalize() @@ -307,7 +307,7 @@ pub struct Physics { impl Physics { pub fn new(dimensions: EntityDimensions, pos: Vec3) -> Self { Self { - velocity: Vec3::default(), + velocity: Vec3::ZERO, vec_delta_codec: VecDeltaCodec::new(pos), old_position: pos, |
