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

Alert player when building above highest z-level #673

Merged
merged 1 commit into from
Dec 1, 2017
Merged

Conversation

Rootmars
Copy link
Contributor

@Rootmars Rootmars commented Nov 27, 2017

Made it so that an alert is displayed when the player attempts to build beyond the highest z-level (e.g. above the platform in babel.)

This also fixes a bug where blocks are consumed when attempting to do such thing.

@NotAFile
Copy link
Contributor

NotAFile commented Nov 27, 2017

Relevant issue: #661
Closes: #661

Edit: Oh, I can't mark issues to be closed as a non-contributor. Makes sense.

@feikname
Copy link
Collaborator

feikname commented Nov 27, 2017

This commit made me realize that Sources/Client/Player.cpp is a mix of tabs and spaces for indentation, weird.

@mschlumpp
Copy link
Contributor

@feikname seems like clang-format is configured to indent with tabs and align with spaces.
screenshot_20171127_205947
The best solution would be if contributions are clang-format "clean", but I guess that's hard to enforce.

Made it so that an alert is displayed when the player attempts
to build beyond the highest z-level (e.g. above the platform
in babel.)

This also fixes a bug where blocks are consumed when attempting
to do such thing.
@feikname
Copy link
Collaborator

@Rootmars I edited you commit to follow the indentation format stated above via force push. Now all that's left is to @yvt review and merge it to be included in the next release.

Thanks for the info, @theunknownxy. I'm glad to see you're still following the development of OS :)

@Rootmars Rootmars changed the title Alert player when building above highest z-level. Alert player when building above highest z-level, First Person spectate now zooms. Nov 29, 2017
@NotAFile
Copy link
Contributor

Reminds me, I still have commits that do zoom etc. for first-person spectators lying around on my PC, I should probably push those.

Also, adding unrelated features to pull requests is generally frowned upon, but I don't have push rights so I'll leave it to the others.

@Rootmars
Copy link
Contributor Author

Rootmars commented Nov 29, 2017

Yeah, that's totally my bad. I wanted to make some changed but I couldn't wait for this pull request to be accepted + I'm relatively new to git. As I've said, I intended to make a separate PR for this.

Should I just scrap this PR?

@feikname
Copy link
Collaborator

feikname commented Nov 29, 2017

@Rootmars I recommend reading about git branch. Generally, it's best to create a new branch for each pull request (i.e. in your case alert-player-on-high-z and improve-spectator-zoom branches).

No need to scrap the PR, you can move the zoom commits to another branch and open a new pull request for them:

To make a new PR about the zoom changes:

  1. git branch fix-third-person-zoom Creates a new branch based on your current local one (in this case, master)
  2. git checkout fix-thirdperson-zoom "Enters" the newly created branch
  3. git rebase -i HEAD~3 Standard procedure for editing commits, edit pick to delete in the "alert player" commit and exit your editor.
  4. Now the unrelated commit has been deleted from the fix-thirdperson-zoom branch
  5. Push the new branch with git push origin fix-thirdperson-zoom and open a new pull request for it.

To remove the zoom commits from this PR:

  1. Go back to the master branch with git checkout master
  2. Delete the unrelated zoom commits from it with git reset --hard HEAD~2 (the number is the amount of recent commits to delete)
  3. Push the master branch again with git push origin master --force

It may seem like a lot of steps (perhaps it is), but you'll get used to the flow and do these steps naturally eventually.

Also, please note that ending your commit titles with a period is strange (they're titles, after all)

edit: I edited this comment a few times in an attempt to make it more readable and less confusing.

@Mduro
Copy link

Mduro commented Nov 29, 2017

Thanks for your advice. I'll do this tomorrow since I have to go to bed.

@Rootmars Rootmars changed the title Alert player when building above highest z-level, First Person spectate now zooms. Alert player when building above highest z-level Nov 30, 2017
@Rootmars
Copy link
Contributor Author

Fixed. I cannot thank you enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants