-
Notifications
You must be signed in to change notification settings - Fork 145
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
Added Sprint Tracking #434
Conversation
Provided CI passes of course |
Refactored the sprint detection to reduce code duplication with the assistance of Defman
The desired refactor didn't work because the method attempted couldn't receive the sprint state from the player
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Defman The macro doesn't approve of packet.action_id
because:
- It doesn't want/expect
.
("unexpected token") - and using the
==
operator isn't permitted forEntityActionKind
Sorry, I swaped the parameters of matches. It should be matches!(packet.action_id, EntityActionKind::StartSprinting). |
Turned out the macro actually expected the packet id and the `EntityActionKind` to be reversed
This works; thanks for clarifying |
If it passes CI I'll merge it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I actually think this is a prime location for a quick unit test. Please write one.
BUMP |
Added Sprint Tracking
Status
Description
Did the same as #428 just for sprinting instead.
Related issues
#423
Checklist
Note: Could not test plugin because of a potential compiler bug in Rust version 1.52.1
cargo fmt
,cargo clippy
,cargo build --release
andcargo test
and fixed any generated errors!