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

Unify wield item handling #8677

Merged
merged 2 commits into from
Aug 7, 2019
Merged

Conversation

SmallJoker
Copy link
Member

This moves the wield item functions to Player and the tool utils for range calculation
Also 'local_inventory' was removed due to redundancy in Client
Removing this duplicated code reduces the possibility of different handling in server and client.

To do

This PR is Ready for Review.

How to test

Create a hand slot, put a tool or anything else in.
Click randomly in your world. If your hand is not capable of digging the node, it will try to fall back to hand (same as in master).

@SmallJoker SmallJoker added @ Server / Client / Env. Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements Code quality labels Jul 14, 2019
This moves the wield item functions to Player and the tool utils for range calculation
Also 'local_inventory' was removed due to redudancy in Client
src/client/client.cpp Outdated Show resolved Hide resolved
Copy link
Member

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okay

@SmallJoker SmallJoker merged commit e462a9a into minetest:master Aug 7, 2019
@SmallJoker SmallJoker deleted the fix_wielditem branch August 17, 2019 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code quality Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements One approval ✅ ◻️ @ Server / Client / Env.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants