Skip to content

Commit

Permalink
Avoid declaring tokens to be vision sources when sight is disabled (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
stwlam committed Mar 12, 2024
1 parent d0fb53e commit cc54843
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/module/canvas/token/object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ class TokenPF2e<TDocument extends TokenDocumentPF2e = TokenDocumentPF2e> extends

/** If Party Vision is enabled, make all player-owned actors count as vision sources for non-GM users */
protected override _isVisionSource(): boolean {
if (!this.hasSight || !this.document.parent?.tokenVision) return false;

// If GM vision is enabled, making nothing a vision source will allow the user to see everything
if (game.pf2e.settings.gmVision && game.user.isGM) return false;

Expand Down

0 comments on commit cc54843

Please sign in to comment.