Skip to content

Fix #3105 - Big rocks push small rocks through the floor #3234

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

VaLLeX8
Copy link

@VaLLeX8 VaLLeX8 commented Apr 3, 2025

  • Removed an optimization condition in collision_static
    function (collision_system.cpp) that skipped collision
    checks for smaller static objects.
  • Previously, when a big rock was processed, it would skip
    collision checks for a smaller rock beneath it, causing the
    smaller rock to fall through the floor.
  • Adjusting the condition to skip larger rocks instead would
    lead to the opposite issue-smaller rocks pushing larger ones
    through the floor.

Closes #3105

VaLLeX8 and others added 2 commits March 26, 2025 18:34
- Removed an optimization condition in collision_static
function (collision_system.cpp) that skipped collision
checks for smaller static objects.
- Previously, when a big rock was processed, it would skip
collision checks for a smaller rock beneath it, causing the
smaller rock to fall through the floor.
- Adjusting the condition to skip larger rocks instead would
lead to the opposite issue—smaller rocks pushing larger ones
through the floor.

Closes SuperTux#3105
@Hypernoot
Copy link
Member

You removed a part of code which was introduced in 24087de to fix #2854 . Can you ensure that your changes won't re-introduce the bug?

@huntekye
Copy link

huntekye commented Apr 3, 2025

Should probably compare against #3231.

@VaLLeX8
Copy link
Author

VaLLeX8 commented Apr 3, 2025

@Hypernoot, you are right - this solution allows crushers to be pushed to the ground by small rocks
as shown here:
https://github.com/user-attachments/assets/231c347f-ee8f-491a-89e7-2c651831008f

In contrast, skipping the check_collisions step allows rocks to pass through the ground:
https://github.com/user-attachments/assets/5510fe71-836d-401d-8ecd-d56c4a7a43cd

Do you think this PR should resolve this bug and reopen #2038, or would you prefer that I address the other bug in this PR as well?

@VaLLeX8
Copy link
Author

VaLLeX8 commented Apr 3, 2025

@huntekye , I see that this bug is already being fixed in that PR in the same way I’m addressing it here.
Thank you for the notice!

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.

[Bug]: Big rocks push small rocks through the floor
3 participants