Skip to content

Player hook: Fix cancelling when player is on wall#2212

Merged
wjt merged 1 commit into
mainfrom
fix-hook-stopping
May 19, 2026
Merged

Player hook: Fix cancelling when player is on wall#2212
wjt merged 1 commit into
mainfrom
fix-hook-stopping

Conversation

@manuq
Copy link
Copy Markdown
Collaborator

@manuq manuq commented May 18, 2026

Do not call move_and_slide() and do not check if it is stuck when the thing being hooked has zero weight, which means the thing is pulled toward the player and the player doesn't move.

There logic for "being stuck" should be revisited in the future. Because a character that isn't tring to move (has no velocity) shouldn't be considered stuck.

This fixes a bug in which trying to pick a button when the player is next to a wall, moves the button a little because the hooking is cancelled.

Fix #1807

Do not call move_and_slide() and do not check if it is stuck when the thing
being hooked has zero weight, which means the thing is pulled toward the player
and the player doesn't move.

There logic for "being stuck" should be revisited in the future. Because a
character that isn't tring to move (has no velocity) shouldn't be considered
stuck.

This fixes a bug in which trying to pick a button when the player is next to a
wall, moves the button a little because the hooking is cancelled.

Fix #1807
@manuq manuq requested a review from a team as a code owner May 18, 2026 17:29
@github-actions
Copy link
Copy Markdown

Play this branch at https://play.threadbare.game/branches/endlessm/fix-hook-stopping/.

(This launches the game from the start, not directly at the change(s) in this pull request.)

@wjt wjt merged commit b8a63c5 into main May 19, 2026
7 checks passed
@wjt wjt deleted the fix-hook-stopping branch May 19, 2026 09:17
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.

Hooking buttons while touching a wall only pulls them a short distance

2 participants