Fix: Player movement

This commit is contained in:
Snowiiii 2024-08-12 18:37:50 +02:00
parent 50051d9dc9
commit dbc7b9f5c1

View File

@ -102,6 +102,9 @@ impl Client {
let player = self.player.as_mut().unwrap();
let entity = &mut player.entity;
entity.lastx = entity.x;
entity.lasty = entity.y;
entity.lastz = entity.z;
entity.x = Self::clamp_horizontal(position_rotation.x);
entity.y = Self::clamp_vertical(position_rotation.feet_y);
entity.z = Self::clamp_horizontal(position_rotation.z);