Fix update_entity_position and fix writing of Angles to client.
Status
[x] Ready
[ ] Development
[ ] Hold
Description
update_entity_position to use both EntityPosition and EntityPositionAndRotation instead of EntityTeleport packet.
Also only sends EntityPositionAndRotation if there was a rotation.
The Writable implementation for Angle was broken before and if you moved in either direction too far it would get stuck on 255. This also solves that. Credits to @Miro-Andrin for coming up with the math.
Related issues
Checklist
[x] Ran cargo fmt, cargo clippy --all-targets, cargo build --release and cargo test and fixed any generated errors!
[x] Removed unnecessary commented out code
[ ] Used specific traces (if you trace actions please specify the cause i.e. the player)
Note: if you locally don't get any errors, but GitHub Actions fails (especially at clippy) you might want to check your rust toolchain version. You can then feel free to fix these warnings/errors in your PR.
Fix update_entity_position and fix writing of Angles to client.
Status
Description
update_entity_position to use both
EntityPosition
andEntityPositionAndRotation
instead ofEntityTeleport
packet. Also only sendsEntityPositionAndRotation
if there was a rotation.The
Writable
implementation forAngle
was broken before and if you moved in either direction too far it would get stuck on 255. This also solves that. Credits to @Miro-Andrin for coming up with the math.Related issues
Checklist
cargo fmt
,cargo clippy --all-targets
,cargo build --release
andcargo test
and fixed any generated errors!Note: if you locally don't get any errors, but GitHub Actions fails (especially at
clippy
) you might want to check your rust toolchain version. You can then feel free to fix these warnings/errors in your PR.