Rocks can activate buttons#1354
Closed
weluvgoatz wants to merge 2 commits intoSuperTux:masterfrom
weluvgoatz:rocks-buttons
Closed
Rocks can activate buttons#1354weluvgoatz wants to merge 2 commits intoSuperTux:masterfrom weluvgoatz:rocks-buttons
weluvgoatz wants to merge 2 commits intoSuperTux:masterfrom
weluvgoatz:rocks-buttons
Conversation
Zwatotem
reviewed
Mar 1, 2020
HybridDog
requested changes
Mar 3, 2020
| auto player = dynamic_cast<Player*>(&other); | ||
| if (!player) return FORCE_MOVE; | ||
| auto rock = dynamic_cast<Rock*>(&other); | ||
| if (!player && !rock) return FORCE_MOVE; |
Contributor
There was a problem hiding this comment.
Please add a line break. (return jumps out of the function execution, so it should always stick out.)
Suggested change
| if (!player && !rock) return FORCE_MOVE; | |
| if (!player && !rock) | |
| return FORCE_MOVE; |
HybridDog
reviewed
Mar 3, 2020
|
|
||
| if (vy <= 0) return FORCE_MOVE; | ||
| //player->add_velocity(Vector(0, -150)); | ||
| player->get_physic().set_velocity_y(-150); |
Contributor
There was a problem hiding this comment.
Could you fix the indentation and a line break to the return?
HybridDog
requested changes
Mar 3, 2020
Comment on lines
75
to
76
| if (state != OFF) return FORCE_MOVE; | ||
| if (!hit.top) return FORCE_MOVE; |
Contributor
There was a problem hiding this comment.
Suggested change
| if (state != OFF) return FORCE_MOVE; | |
| if (!hit.top) return FORCE_MOVE; | |
| if (state != OFF || !hit.top) | |
| return FORCE_MOVE; |
Member
Author
|
Closing, due to lack of activity and lack of interest. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR allows rocks to be thrown onto pushbuttons in order to activate them. While it seems this is an approved feature, I would like testing for it.