Added wrapper for Token.updateVisionSource for Foundry v9. This function kicks off the ClockwiseSweepPolygon creation to recalculate the token's vision. This update's Wall Height's currentTokenElevation and currentTokenHeight to the token currently being calculated, so we have the correct data to include/ignore walls.
This change retains compatablity with Foundry v8 while fixing vision issues with multiple tokens in v9 (issue #36).
Also tidied the code to make it more easily readable.
Added wrapper for Token.updateVisionSource for Foundry v9. This function kicks off the ClockwiseSweepPolygon creation to recalculate the token's vision. This update's Wall Height's currentTokenElevation and currentTokenHeight to the token currently being calculated, so we have the correct data to include/ignore walls.
This change retains compatablity with Foundry v8 while fixing vision issues with multiple tokens in v9 (issue #36).
Also tidied the code to make it more easily readable.