Skip to content

Fixes Bug #3209 #3232

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
Open

Fixes Bug #3209 #3232

wants to merge 2 commits into from

Conversation

Filipe2004
Copy link

Tux wasn't able to stand on or jump off a frozen badguy that was bouncing of a trampoline, getting stuck in the falling animation while on the frozen badguy. To solve this I added a verification on Player::collision for when the badguy is frozen and the player hits bottom. Inside the if I adapted the code on collision_solid so that it performs similar to when the player collides with a solid and the hit is on the bottom. Also added a verification for the velocity of the badguy, because for some reason if it is static it enter both the Player:collision and Player:collision_solid.

…ncing

Tux wasn't able to stand on or jump off a frozen badguy that was
bouncing of a trampoline, getting stuck in the falling animation
while on the frozen badguy. To solve this I added a verification
on Player::collision for when the badguy is frozen and the player
hits bottom. Inside the if I adapted the code on collision_solid
so that it performs similar to when the player collides with a
solid and the hit is on the bottom.

Closes SuperTux#3209
@tobbi tobbi requested review from Vankata453 and MatusGuy April 19, 2025 16:48
@tobbi
Copy link
Member

tobbi commented Apr 19, 2025

Hey, @Filipe2004

thanks for your contribution! I see that you copied a lot of source code from the Player::collision_solid(CollisionHit&) method. I'd like to avoid having duplicate source code. I'd appreciate if you could simply call the function above with appropriate parameters instead.

@MatusGuy
Copy link
Member

MatusGuy commented Apr 19, 2025

simply call the function above with appropriate parameters instead.

Don't do this. The collision_solid function is used by the collision system to run callbacks on static collision. Calling this function explicitly is confusing and can lead to unwanted side effects.
Instead, write a new function, and call it there and here.

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.

3 participants