Skip to content

Commit

Permalink
fix weird teleportation when entering house
Browse files Browse the repository at this point in the history
  • Loading branch information
Lamby777 committed Jun 23, 2024
1 parent 0a820d2 commit 9cdd79e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pets-lib/src/world/playercb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,11 @@ impl PlayerCB {
if clear_past {
self.past_positions.clear();
self.past_rotations.clear();
} else {
self.past_positions.push(pos);

let rot = rot.unwrap_or(self.last_rot());
self.past_rotations.push(rot);
}

self.past_positions.push(pos);
self.past_rotations.push(rot.unwrap_or(self.last_rot()));

self.move_chars(false);
self.base_mut().set_global_position(pos);
}
Expand Down

0 comments on commit 9cdd79e

Please sign in to comment.