Skip to content

Commit

Permalink
Ignore color tint from light sources with intensity of zero
Browse files Browse the repository at this point in the history
  • Loading branch information
Rampastring committed Dec 18, 2024
1 parent 82c726f commit 3177391
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/TSMapEditor/Models/MapTile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ public void RefreshLighting(Lighting lighting, LightingPreviewMode lightingPrevi
// Check all the light sources and how they affect this light
foreach (var source in LightSources)
{
// Sources with intensity of 0.0 don't get any light applied
if (source.Source.ObjectType.LightIntensity == 0.0)
continue;

double distanceRatio = 1.0 - (source.DistanceInLeptons / source.Source.ObjectType.LightVisibility);

// Intensity modifies the cell ambient value.
Expand Down

0 comments on commit 3177391

Please sign in to comment.