undefined cannot be transmitted via json, so we use null to reset the movement history instead
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
## In development
|
||||||
|
### Bugfixes
|
||||||
|
- The reset movement history button now resets the movement history for all players, not just for the GM
|
||||||
|
|
||||||
|
|
||||||
## 1.6.1
|
## 1.6.1
|
||||||
### API
|
### API
|
||||||
- Added `onMovementHistoryUpdate` callback to Speed Providers, that allows them to perform game systems specific improvements to the movement history
|
- Added `onMovementHistoryUpdate` callback to Speed Providers, that allows them to perform game systems specific improvements to the movement history
|
||||||
|
|||||||
@@ -86,8 +86,8 @@ export async function resetMovementHistory(combat, combatantId) {
|
|||||||
const dragRulerFlags = combatant.flags.dragRuler;
|
const dragRulerFlags = combatant.flags.dragRuler;
|
||||||
if (!dragRulerFlags)
|
if (!dragRulerFlags)
|
||||||
return;
|
return;
|
||||||
dragRulerFlags.passedWaypoints = undefined;
|
dragRulerFlags.passedWaypoints = null;
|
||||||
dragRulerFlags.trackedRound = undefined;
|
dragRulerFlags.trackedRound = null;
|
||||||
dragRulerFlags.rulerState = undefined;
|
dragRulerFlags.rulerState = null;
|
||||||
await updateCombatantDragRulerFlags(combat, [{_id: combatantId, dragRulerFlags}]);
|
await updateCombatantDragRulerFlags(combat, [{_id: combatantId, dragRulerFlags}]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user