diff --git a/crates/horizon-client/src/game/commands.rs b/crates/horizon-client/src/game/commands.rs index bab925c4f..d41543d90 100644 --- a/crates/horizon-client/src/game/commands.rs +++ b/crates/horizon-client/src/game/commands.rs @@ -1098,11 +1098,15 @@ impl Game<'_> { if let Some(m) = self.mobs.iter_mut().find(|m| m.id == id) { m.position = v; m.previous = v; + // Entity.teleportSetPosition: setYRot, setYHeadRot, setXRot + // (clamped to -90..90), then setOldRot. if let Some([yaw, pitch]) = rotation { m.yaw = yaw; m.body_yaw = yaw; - // Entity.setXRot clamps to -90..90. + m.head_yaw = yaw; m.head_pitch = pitch.clamp(-90.0, 90.0); + m.previous_yaw = m.yaw; + m.previous_head_pitch = m.head_pitch; } } }