Skip to content

Fix "I can't reach that." when closing doors from a distance#1013

Merged
GregHib merged 1 commit into
GregHib:mainfrom
Tect0r:bugs/issue-989
Jun 28, 2026
Merged

Fix "I can't reach that." when closing doors from a distance#1013
GregHib merged 1 commit into
GregHib:mainfrom
Tect0r:bugs/issue-989

Conversation

@Tect0r

@Tect0r Tect0r commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Fix for #989

Summary

Closing an open door from a distance worked, but then incorrectly spammed "I can't reach that." Opening doors from a distance was unaffected.

Root cause

Door open/close uses an operate interaction through arriveDelay(). When the player has just taken the final step, the action resumes on the next tick inside checkDelay, before mode.tick() runs.

Closing swaps the open door for a closed one and updates Collisions.map with a blocking wall, but the Interact mode is not cleared. It then reaches mode.tick() in the same tick and re-checks reachability using the old open-door snapshot against the updated closed-door collision map. That makes reached() return false and falls through to cantReach().

Opening removes collision instead, so the stale interaction still resolves cleanly.

Fix

In Interact.tick(), clear an already-launched interaction once it has completed (suspension == null && !contains("delay")) instead of rechecking reachability against a mutated collision map.

This fixes doors and the broader case where completing an interaction mutates the target's collision.

@GregHib GregHib merged commit 110d2d3 into GregHib:main Jun 28, 2026
2 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.

2 participants