RPTools/maptool

[Bug]: Deny Token Movement Flag Does Not Reset Token Position Properly if Layout has an Offset

Opened this issue · 1 comments

Describe the Bug

Deny Token Movement Flag Does Not Reset Token Position Properly if Layout has an Offset

To Reproduce

  1. Place a token on a map.
  2. Adjust the token's Horizontal/Vertical Layout to a Value other than 0.
  3. Set a token property that determines whether the token should be allowed to move (I use a property just named "Movement").
  4. In your onTokenMove macro, have it set tokens.denyMove to 1 when the property would be at a value that shouldn't allow movement (in my case, that would look like: [h, if(getProperty("Movement") == "None"): tokens.denyMove = 1]
  5. Disable "Snap to Grid" for the token.
  6. Drag the token around the map.
  7. Observe the token does not reset to its original position, but rather to a fraction of its original position impacted by the offset.

Expected Behaviour

If the tokens is denied movement, it should always reset to its starting location, regardless of token layout.

Screenshots

No response

MapTool Info

1.18.5

Desktop

Win 11 (Latest Official Build)

Additional Context

No response

Upon further testing, this seems to only occur when "Snap to Grid" is disabled.