Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
theripper93 committed Sep 10, 2022
1 parent d579eac commit bbd6a4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/patches.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ export function registerWrappers() {
function isDoorVisible(wrapped, ...args) {
const wall = this.wall;
const { advancedVision } = getSceneSettings(wall.scene);
const isUI = WallHeight.isLevels && CONFIG.Levels?.UI?.rangeEnabled
const elevation = isUI && !canvas.tokens.controlled[0] ? WallHeight.currentTokenElevation : WallHeight._token?.document?.elevation;
//const isUI = WallHeight.isLevels && CONFIG.Levels?.UI?.rangeEnabled
const elevation = WallHeight.currentTokenElevation//isUI && !canvas.tokens.controlled[0] ? WallHeight.currentTokenElevation : WallHeight._token?.document?.elevation;
if (elevation == null || !advancedVision) return wrapped(...args);
const { top, bottom } = getWallBounds(wall);
const inRange = elevation >= bottom && elevation <= top;
Expand Down

0 comments on commit bbd6a4e

Please sign in to comment.