aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-09-19 21:44:13 -0500
committermat <github@matdoes.dev>2022-09-19 21:44:13 -0500
commit788e9e875ab1d64441673497076dde8a50a4394c (patch)
treee2747160d14a97cbd24164366636cbf77dc88112
parent528c1a07e3ac089ff70036a5e403eb2b8d3ae21f (diff)
downloadazalea-drasl-788e9e875ab1d64441673497076dde8a50a4394c.tar.xz
fix rotations
-rw-r--r--azalea-client/src/client.rs4
-rw-r--r--azalea-world/src/entity/mod.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs
index 14ebf9e9..e422e89a 100644
--- a/azalea-client/src/client.rs
+++ b/azalea-client/src/client.rs
@@ -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 {
diff --git a/azalea-world/src/entity/mod.rs b/azalea-world/src/entity/mod.rs
index 7c3e3873..b190d63e 100644
--- a/azalea-world/src/entity/mod.rs
+++ b/azalea-world/src/entity/mod.rs
@@ -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
}