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

Fix placing blocks on plants or other non-obstacles (simple fix) #181

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

satoshinm
Copy link
Contributor

Right-clicking on a non-obstacle block (such as a plant) used to do nothing. I originally suspected it was an issue in hit testing, but turns out to be an easy fix: if the hit target is not an obstacle, then create the new block on the clicked block. This matches the commonly expected behavior e.g. in Minecraft.

Before:

screen shot 2017-05-07 at 7 52 07 pm

After right-click, without this pull request: nothing happens

screen shot 2017-05-07 at 7 52 07 pm

After right-click, with this pull request:

screen shot 2017-05-07 at 7 52 14 pm

satoshinm added a commit to satoshinm/NetCraft that referenced this pull request May 8, 2017
For example, if you right-click to place a block on a plant, then
instead of doing nothing, it replaces the plant. Builds over it, instead
of on it. Obstacles are still built on, as before.

fogleman/Craft#181
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.

1 participant