From 29c32c9ba89d60b5b0e415eaab58b947080655c5 Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 12 Aug 2025 10:47:33 +1000 Subject: fix rotations flagging anticheats --- azalea-client/src/plugins/packet/game/mod.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'azalea-client/src/plugins/packet') 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( -- cgit v1.2.3