From 9cdd79ea7abd6e5902ab39a65a92c733ead6c8f7 Mon Sep 17 00:00:00 2001 From: Cherry Date: Sun, 23 Jun 2024 18:06:11 -0400 Subject: [PATCH] fix weird teleportation when entering house --- pets-lib/src/world/playercb.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pets-lib/src/world/playercb.rs b/pets-lib/src/world/playercb.rs index dd0d15ac..d03cd9c9 100644 --- a/pets-lib/src/world/playercb.rs +++ b/pets-lib/src/world/playercb.rs @@ -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); }