Skip to content

1.16 - Fix bad FoW check in PointerTool#5309

Merged
cwisniew merged 3 commits intoRPTools:release-1.16from
kwvanderlinde:bugfix/5308-bad-fow-check-PointerTool
Mar 25, 2025
Merged

1.16 - Fix bad FoW check in PointerTool#5309
cwisniew merged 3 commits intoRPTools:release-1.16from
kwvanderlinde:bugfix/5308-bad-fow-check-PointerTool

Conversation

@kwvanderlinde
Copy link
Collaborator

@kwvanderlinde kwvanderlinde commented Mar 25, 2025

Identify the Bug or Feature request

Fixes #5308

Description of the Change

This fixes two issues with PointerTool:

  1. During validation, token bounds must offset based on the lead token anchor position instead of it's regular x/y coordinates. The rest of the drag logic works off anchor position since 1.16, so this needed an update as well.
  2. Separates the validation logic from the "Snap Token while dragging" preference so it isn't required to get consistent validation for snap-to-grid tokens.

StampTool was updated in a similar way to stay as much in line with PointerTool as possible, even though it doesn't have the same underlying issue due to not validating stamp moves.

Possible Drawbacks

None

Documentation Notes

N/A

Release Notes

  • Fixed a bug where hard FoW would erroneously block token moves in some cases and fail to moves in other cases.

This change is Reviewable

Every other part of token dragging measures against the anchor, and this discrepency meant the FoW checks were not
checking the correct position.
This lets rendering still be done smoothly, but validation is done "cell by cell" even when the preference is disabled.
StampTool doesn't have the same issue as PointerTool since it doesn't validation drags, but we might as well keep the
structure as similar as possible.
@kwvanderlinde kwvanderlinde self-assigned this Mar 25, 2025
@kwvanderlinde kwvanderlinde changed the title Fix bad FoW check in PointerTool 1.16 - Fix bad FoW check in PointerTool Mar 25, 2025
@github-actions github-actions bot added the bug label Mar 25, 2025
@kwvanderlinde kwvanderlinde moved this to Awaiting-Review in MapTool 1.16 Mar 25, 2025
@cwisniew cwisniew merged commit 95479f1 into RPTools:release-1.16 Mar 25, 2025
5 checks passed
@kwvanderlinde kwvanderlinde deleted the bugfix/5308-bad-fow-check-PointerTool branch March 25, 2025 02:29
@kwvanderlinde kwvanderlinde moved this from Awaiting-Review to Merged in MapTool 1.16 Mar 25, 2025
@kwvanderlinde kwvanderlinde linked an issue Mar 25, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

No open projects
Status: Merged

Development

Successfully merging this pull request may close these issues.

[Bug]: Token dragging does not check fog-of-war correctly

2 participants