mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
fix rotations
This commit is contained in:
parent
528c1a07e3
commit
788e9e875a
2 changed files with 4 additions and 4 deletions
|
@ -418,10 +418,10 @@ impl Client {
|
|||
let mut y_rot = p.y_rot;
|
||||
let mut x_rot = p.x_rot;
|
||||
if p.relative_arguments.x_rot {
|
||||
y_rot += player_entity.x_rot;
|
||||
x_rot += player_entity.x_rot;
|
||||
}
|
||||
if p.relative_arguments.y_rot {
|
||||
x_rot += player_entity.y_rot;
|
||||
y_rot += player_entity.y_rot;
|
||||
}
|
||||
|
||||
player_entity.delta = Vec3 {
|
||||
|
|
|
@ -113,8 +113,8 @@ impl<'d> EntityMut<'d> {
|
|||
}
|
||||
|
||||
pub fn set_rotation(&mut self, y_rot: f32, x_rot: f32) {
|
||||
self.y_rot = y_rot.clamp(-90.0, 90.0) % 360.0;
|
||||
self.x_rot = x_rot % 360.0;
|
||||
self.y_rot = y_rot % 360.0;
|
||||
self.x_rot = x_rot.clamp(-90.0, 90.0) % 360.0;
|
||||
// TODO: minecraft also sets yRotO and xRotO to xRot and yRot ... but idk what they're used for so
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue