Skip to content

Fix #3685: Prevent coin collection through solid weak blocks#3762

Open
baltazarReis wants to merge 3 commits into
SuperTux:masterfrom
baltazarReis:fix-iceblock-coin-bug
Open

Fix #3685: Prevent coin collection through solid weak blocks#3762
baltazarReis wants to merge 3 commits into
SuperTux:masterfrom
baltazarReis:fix-iceblock-coin-bug

Conversation

@baltazarReis

@baltazarReis baltazarReis commented Mar 26, 2026

Copy link
Copy Markdown

This PR fixes a bug where players could collect coins trapped inside a WeakBlock (like ice blocks) before the block was destroyed.

Added is_solid_block() method to WeakBlock to check its current state.

Modified Coin::collision to prevent collection if the coin's center is inside a solid WeakBlock.

Closes #3685

Comment thread src/object/weak_block.hpp Outdated
Comment thread src/object/coin.cpp Outdated
baltazarReis and others added 2 commits June 19, 2026 16:36
Co-authored-by: MatusGuy <85036874+MatusGuy@users.noreply.github.com>
Co-authored-by: MatusGuy <85036874+MatusGuy@users.noreply.github.com>
@baltazarReis

Copy link
Copy Markdown
Author

You're right, it becomes much simpler. I've applied the changes you requested and tested them, works the same.

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]: Some coins inside ice blocks can be grabbed without melting

2 participants