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

Players are no longer kicked when clicking on bedrock #5023

Merged
merged 3 commits into from
Nov 6, 2020
Merged

Conversation

tigerw
Copy link
Member

@tigerw tigerw commented Nov 3, 2020

case E_BLOCK_TRIPWIRE: return true;
default: return false;
}
return GetHardness(Block) == 0;
Copy link
Member

Choose a reason for hiding this comment

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

This can be simplified

Suggested change
return GetHardness(Block) == 0;
return !GetHardness(Block);

see http://cpp.sh/4w4sm3

Copy link
Member

Choose a reason for hiding this comment

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

although I didn't check if this also triggers clang. I'm thinking about a simple idea to get rid of the clang pacifier

Copy link
Member Author

Choose a reason for hiding this comment

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

It triggers another warning (conversion float to bool).

I think the warning is bogus here; we're able to compare to exactly floating zero because GetHardness returns exactly zero.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah - you are right you actually set it to 0. Maybe leave a comment?

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, fixed.

@cuberite cuberite deleted a comment from bennasar99 Nov 6, 2020
@tigerw tigerw merged commit 645fea4 into master Nov 6, 2020
@tigerw tigerw deleted the BedrockBreaking branch November 6, 2020 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disabling checking breaking a bedrock is possible?
2 participants