Skip to content

Commit

Permalink
Remove obsolete player movement X direction restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
64kramsystem committed Jul 26, 2022
1 parent 7ff5625 commit db083e4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/movement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,7 @@ pub fn clamp_player_movements(
let new_movement = movement.map(|mut movement| {
let new_x = location.x + movement.x;

// The dir.x condition allows some flexibility (e.g. in case of knockback), given
// the current state of development. To be removed once the movement logic is
// stabilized.
//
if movement.x < 0. && new_x < left_movement_boundary.0 {
if new_x < left_movement_boundary.0 {
movement.x = 0.;
}

Expand Down

0 comments on commit db083e4

Please sign in to comment.