Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Identify the Bug or Feature request
Fixes #4213
Description of the Change
The primary change is to avoid building
DrawableLight
objects for clear lights (lights with anull
paint).This required changes to how player darkness is rendered as we can no longer rely on each darkness being represented as
DrawableLight
s (darkness can be clear just like lights). So instead we now find the entire darkened area from theZoneView
and render that as black without needing to know about the individual darkness sources.For a performance win, we also now avoid rendering the colour aspect of darkness when the player is not a GM, since only GMs can see them anyways.
Some minor edits made along the way were:
null
checks inZoneRenderer
regarding the visible area.Possible Drawbacks
Anyone with a clear light may have gotten used to the 1.13 behaviour of treating it as black. Can be worked around by explicitly defining the light as black.
Documentation Notes
Lights will be rendered a clear if no colour is given, e.g.,
Transparent 20: scale circle 20+100
Release Notes
This change is