Eranziel / foundryvtt-lancer

A Foundry VTT game system for LANCER RPG.
GNU General Public License v3.0
105 stars 63 forks source link

[BUG] Non-integer token width breaks Spotter automation #709

Closed Eranziel closed 3 months ago

Eranziel commented 3 months ago

Describe the bug When targeting a token with an attack, having a mech token on the scene with Spotter and a non-integer width (e.g. 0.5) causes an error due to infinite recursion.

To Reproduce Steps to reproduce the behavior:

  1. Create a scene with:
    • Any PC mech
    • A PC mech with Spotter and token width & height manually set to 0.5
    • An NPC mech with lock on
  2. Start an attack with the first PC mech
  3. Target the NPC with lock on
  4. Attack HUD stops responding. Console logs an error due to maximum stack size reached.

Expected behavior Token size should not cause a breaking error in the attack flow.

Screenshots image