From 5c7332b4692986f8c0ca969d79a6eb39feca686a Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 20 Mar 2025 03:30:57 +0000 Subject: add Event::Spawn --- azalea-entity/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'azalea-entity/src') 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, -- cgit v1.2.3