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

Issue 1398 fix throwable bug with coins #1449

Merged

Conversation

martinvanzijl
Copy link
Contributor

Fixes #1398. Throwable objects like rocks will no longer collide with coins or "flame" objects, like rotating ice balls.

Demo before:

rock-coin-bug-before

Demo after:

rock-coin-bug-after

@martinvanzijl
Copy link
Contributor Author

Should the idea of thrown objects collecting coins (#1398 (comment)) be raised as a seperate feature request?

@HybridDog
Copy link
Contributor

HybridDog commented Jun 24, 2020

There could be an easier fix.
As far as I can see, the cases in which the rock should not be moved are objects which have the COLGROUP_TOUCHABLE collision group, which is visualized in orange:
fot_2020-06-24-18:37:20_029728264
fot_2020-06-24-18:37:50_023642255
fot_2020-06-24-18:37:58_590875101

When I wrote the code I didn't think about touch collisions. I assume the problem could be fixed with moving_object->get_group() == COLGROUP_TOUCHABLE (and including collision/collision_group.hpp).

@martinvanzijl
Copy link
Contributor Author

@HybridDog Thanks for the suggestion! This seems to work, and is a lot simpler, so I changed the code accordingly.

@tobbi tobbi merged commit 282a34e into SuperTux:master Jun 27, 2020
@martinvanzijl martinvanzijl deleted the issue-1398-fix-throwable-bug-with-coins branch June 28, 2020 05:15
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.

Throwable objects interact with coins
3 participants