aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/plugins/packet
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-08-12 10:47:33 +1000
committermat <git@matdoes.dev>2025-08-12 07:47:38 +0700
commit29c32c9ba89d60b5b0e415eaab58b947080655c5 (patch)
treece7a6291aa83409f86037f264c7053450ce6dd1d /azalea-client/src/plugins/packet
parent7d9dee7a4dcf7e2b41bee37d2aebaa6ef48a5ba2 (diff)
downloadazalea-drasl-29c32c9ba89d60b5b0e415eaab58b947080655c5.tar.xz
fix rotations flagging anticheats
Diffstat (limited to 'azalea-client/src/plugins/packet')
-rw-r--r--azalea-client/src/plugins/packet/game/mod.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/azalea-client/src/plugins/packet/game/mod.rs b/azalea-client/src/plugins/packet/game/mod.rs
index 1fa3e109..fe294ad0 100644
--- a/azalea-client/src/plugins/packet/game/mod.rs
+++ b/azalea-client/src/plugins/packet/game/mod.rs
@@ -900,10 +900,10 @@ impl GamePacketHandler<'_> {
};
let new_delta = p.delta.clone();
- let new_look_direction = LookDirection {
- x_rot: (p.x_rot as i32 * 360) as f32 / 256.,
- y_rot: (p.y_rot as i32 * 360) as f32 / 256.,
- };
+ let new_look_direction = LookDirection::new(
+ (p.y_rot as i32 * 360) as f32 / 256.,
+ (p.x_rot as i32 * 360) as f32 / 256.,
+ );
let new_on_ground = p.on_ground;
@@ -938,10 +938,10 @@ impl GamePacketHandler<'_> {
let entity = entity_id_index.get_by_minecraft_entity(p.entity_id);
if let Some(entity) = entity {
- let new_look_direction = LookDirection {
- x_rot: (p.x_rot as i32 * 360) as f32 / 256.,
- y_rot: (p.y_rot as i32 * 360) as f32 / 256.,
- };
+ let new_look_direction = LookDirection::new(
+ (p.y_rot as i32 * 360) as f32 / 256.,
+ (p.x_rot as i32 * 360) as f32 / 256.,
+ );
let new_on_ground = p.on_ground;
commands.entity(entity).queue(RelativeEntityUpdate::new(