From 52cb2a9cb9a4644d3681e06452aa2295aa8c4c12 Mon Sep 17 00:00:00 2001 From: Marcus B Spencer Date: Mon, 7 Oct 2024 13:24:24 -0500 Subject: [PATCH] Allow picking up items while crawling (#3062) 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. --- src/object/player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/object/player.cpp b/src/object/player.cpp index 8f2a4b32fc7..22a5ce3ed12 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -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) { Vector pos(0.0f, 0.0f);