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

Check item_drop amount clientside #6242

Merged
merged 1 commit into from Aug 26, 2017

Conversation

rubenwardy
Copy link
Member

No description provided.

Copy link
Member Author

@rubenwardy rubenwardy left a comment

Choose a reason for hiding this comment

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

tested 👍

@rubenwardy rubenwardy added One approval ✅ ◻️ @ Script API @ Server / Client / Env. Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements labels Aug 12, 2017
@rubenwardy
Copy link
Member Author

<@rubenwardy> only new clients connecting to a new server will be able to drop just one item
<@rubenwardy> so old clients can only drop the old stack

src/game.cpp Outdated
@@ -2655,10 +2655,12 @@ void Game::processItemSelection(u16 *new_playeritem)
}


void Game::dropSelectedItem()
void Game::dropSelectedItem(bool single_item)
{
IDropAction *a = new IDropAction();
a->count = 0;
Copy link
Member

@nerzhul nerzhul Aug 18, 2017

Choose a reason for hiding this comment

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

use ternary operator ? you set count twice

@nerzhul
Copy link
Member

nerzhul commented Aug 18, 2017

sounds okay, i prefer to have the sneak check client side, server side can be inaccurate, just fix the two a->count assignment

Copy link
Member

@nerzhul nerzhul left a comment

Choose a reason for hiding this comment

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

okay for this if a->count double assignment is fixed

@rubenwardy
Copy link
Member Author

@nerzhul done

@nerzhul nerzhul merged commit ad9677a into minetest:master Aug 26, 2017
sfan5 pushed a commit that referenced this pull request Nov 19, 2017
@sfan5 sfan5 mentioned this pull request Dec 5, 2017
sfan5 pushed a commit that referenced this pull request Dec 5, 2017
osjc pushed a commit to osjc/minetest that referenced this pull request Jan 11, 2019
osjc pushed a commit to osjc/minetest that referenced this pull request Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements One approval ✅ ◻️ @ Script API @ Server / Client / Env.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants