You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When AI is enabled for pathfinding and maptool doesn't find a path to the destination, the token is forced there, even if tokens.denyMove is set to 1 in onTokenMove.
To Reproduce
Steps to reproduce the behavior:
Make an area inaccessible for a token, for example a square VBL.
Enable AI.
Define onTokenMove() with a single line: [tokens.denyMove = 1]
Try to move the token. The token can move to the inaccessible area.
Expected behavior
[tokens.denyMove = 1] prevents all movement.
MapTool Info
Version: 1.5.3
Install: New
Desktop (please complete the following information):
OS: Windows
Version: 10
Additional context
This bug might be caused by the unusual getLastPath() given for a AI forced move. Typically the path given starts with the original location of the token, but if AI forces the movement the path only contains the new location.
EDIT: I did some more testing. It appears that if the A*Pathfinding timeouts, the last waypoint gets deleted from the path. If no waypoints were set, the original location of the token gets deleted, which causes this bug.
The text was updated successfully, but these errors were encountered:
Merudo
added a commit
to Merudo/maptool
that referenced
this issue
Jul 31, 2019
The last waypoint (or initial location if no waypoint) was ignored if the next move incurred a A* timeout. Fixed by construction a direct path if there is timeout.
Merudo
added a commit
to Merudo/maptool
that referenced
this issue
Jul 31, 2019
The last waypoint (or initial location if no waypoint) was ignored if the next move incurred a A* timeout. Fixed by construction a direct path if there is timeout.
The last waypoint (or initial location if no waypoint) was ignored if the next move incurred a A* timeout. Fixed by construction a direct path if there is timeout.
Describe the bug
When AI is enabled for pathfinding and maptool doesn't find a path to the destination, the token is forced there, even if tokens.denyMove is set to 1 in onTokenMove.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
[tokens.denyMove = 1] prevents all movement.
MapTool Info
Desktop (please complete the following information):
Additional context
This bug might be caused by the unusual getLastPath() given for a AI forced move. Typically the path given starts with the original location of the token, but if AI forces the movement the path only contains the new location.
EDIT: I did some more testing. It appears that if the A*Pathfinding timeouts, the last waypoint gets deleted from the path. If no waypoints were set, the original location of the token gets deleted, which causes this bug.
The text was updated successfully, but these errors were encountered: