Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
theripper93 committed Sep 2, 2024
1 parent 36e8bca commit e3367a3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions scripts/patches.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class WallHeightUtils{
this._autoLosHeight = false;
this._defaultTokenHeight = 6;
this._losHeightMulti = 0.89;
this.reinitializeLightSources = foundry.utils.debounce(this.reinitializeLightSources.bind(this), 1);
this.reinitializeLightSources = foundry.utils.debounce(this.reinitializeLightSources.bind(this), 16);
}

cacheSettings(){
Expand Down Expand Up @@ -289,10 +289,7 @@ export function registerWrappers() {
if (!advancedVision) return result;
const {top, bottom} = getWallBounds(wall);
const object = this.config?.source?.object ?? this.origin?.object ?? this.object;
if (!object) {
//console.warn(`Wall Height: Ignoring Wall Height for this test\n\nNo source found in ${this.constructor.name}#config, the system or module performing the check has not provided an object to test against. Please make sure to include a source in the configuration object of your PointVisionSource`);
return result;
}
if (!object) return result;
const b = object?.b ?? object?.elevation ?? -Infinity;
const t = object?.t ?? object?.elevation ?? +Infinity;
return b >= bottom && t <= top;
Expand Down

0 comments on commit e3367a3

Please sign in to comment.