Skip to content

Commit

Permalink
Fix: Player movement
Browse files Browse the repository at this point in the history
  • Loading branch information
Snowiiii committed Aug 12, 2024
1 parent 50051d9 commit dbc7b9f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pumpkin/src/client/player_packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dbc7b9f

Please sign in to comment.