From eeec59adabb8c084c8b6b847a31130eb7c37d2ee Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 12 Oct 2023 22:39:29 -0500 Subject: KnockbackEvent and rename Physics::delta to velocity --- azalea-physics/src/collision/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'azalea-physics/src/collision') diff --git a/azalea-physics/src/collision/mod.rs b/azalea-physics/src/collision/mod.rs index 1a8f4441..2c739b24 100644 --- a/azalea-physics/src/collision/mod.rs +++ b/azalea-physics/src/collision/mod.rs @@ -201,8 +201,8 @@ pub fn move_colliding( // if self.isRemoved() { return; } if horizontal_collision { - let delta_movement = &physics.delta; - physics.delta = Vec3 { + let delta_movement = &physics.velocity; + physics.velocity = Vec3 { x: if x_collision { 0. } else { delta_movement.x }, y: delta_movement.y, z: if z_collision { 0. } else { delta_movement.z }, @@ -213,7 +213,7 @@ pub fn move_colliding( // blockBelow.updateEntityAfterFallOn(this.level, this); // the default implementation of updateEntityAfterFallOn sets the y movement to // 0 - physics.delta.y = 0.; + physics.velocity.y = 0.; } if on_ground { -- cgit v1.2.3