Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix write order of C00SpawnEntity, pitch first then yaw. #27

Merged
merged 1 commit into from
Jan 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/network/packets/clientbound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ pub struct C00SpawnEntity {
pub x: f64,
pub y: f64,
pub z: f64,
pub yaw: f32,
pub pitch: f32,
pub yaw: f32,
pub data: i32,
pub velocity_x: i16,
pub velocity_y: i16,
Expand All @@ -98,8 +98,8 @@ impl ClientBoundPacket for C00SpawnEntity {
buf.write_double(self.x);
buf.write_double(self.y);
buf.write_double(self.z);
buf.write_byte((self.yaw % 350f32 / 350f32 * 256f32) as i8);
buf.write_byte((self.pitch % 350f32 / 350f32 * 256f32) as i8);
buf.write_byte((self.yaw % 350f32 / 350f32 * 256f32) as i8);
buf.write_int(self.data);
buf.write_short(self.velocity_x);
buf.write_short(self.velocity_y);
Expand Down