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

Allow picking up items while crawling #3062

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

marbens-arch
Copy link
Contributor

@marbens-arch marbens-arch commented Sep 13, 2024

Allows picking up items (such as springs* and stone blocks), while Tux is crawling (triggered by moving while ducking).

This is to avoid Tux getting trapped by any item that can be grabbed.

Closes #2979.

Allows picking up items (such as springs and stone blocks), while Tux
is crawling (triggered by moving while ducking).

This is to avoid Tux getting trapped by any item that can be grabbed.

Closes SuperTux#2979.
@MatusGuy MatusGuy self-requested a review October 6, 2024 11:02
Copy link
Member

@MatusGuy MatusGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will test later

@@ -1736,7 +1736,7 @@ Player::position_grabbed_object(bool teleport)
bool
Player::try_grab()
{
if (m_controller->hold(Control::ACTION) && !m_grabbed_object && !m_duck && !m_released_object)
if (m_controller->hold(Control::ACTION) && !m_grabbed_object && !(m_duck ^ m_crawl) && !m_released_object)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haven't seen an xor in a while

@MatusGuy MatusGuy merged commit 52cb2a9 into SuperTux:master Oct 7, 2024
33 checks passed
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.

Picking up stuff while crawling
3 participants