Skip to content

Fix/drag unconscious softlock#602

Closed
tais wants to merge 2 commits into
1dot13:masterfrom
tais:fix/drag-unconscious-softlock
Closed

Fix/drag unconscious softlock#602
tais wants to merge 2 commits into
1dot13:masterfrom
tais:fix/drag-unconscious-softlock

Conversation

@tais

@tais tais commented May 25, 2026

Copy link
Copy Markdown
Contributor

[16:37]Brit: Basically whenever a mercenary is in a "dying" state (black&white picture) and you try to drag them with another mercenary, they become like a "ghost" and you cannot interact or do anything with them at all. If you continue to try, eventually the game freezes.
[16:38]Brit: I have only tried in combat phase, not peaceful.
[16:39]Brit: It was a very consistent bug in my last playthrough which was V5 (buggy) but i have had in version prior too.

tais added 2 commits May 25, 2026 16:48
IsDragging() defaults to aStopIfConditionNotSatisfied=true, so these
read-only cost queries could call CancelDrag() and reposition the
dragged body mid-pathfind, corrupting FindBestPath's view of the world
and freezing the game. Pass false so they only read state.
Same IsDragging() side-effect as the path fix: these read-only
queries (movement noise, face drag icon, carried weight) must not
cancel the drag or reposition the dragged body. Pass false.
@tais

tais commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #603

@tais tais closed this May 27, 2026
majcosta added a commit that referenced this pull request Jun 2, 2026
Same logic but cleaned up version of #602 which Tais contributed with Claude Code's help

Most calls to SOLDIERTYPE::IsDragging() aren't supposed to have a side effect of cancelling a drag, being simple queries.
Changing the default to reflect that is right move.

Assisted-by: Claude:
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.

1 participant