Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
Fix lights illuminating the planet
Browse files Browse the repository at this point in the history
Remove layer 10 from the light's cull mask.  Issue #10
  • Loading branch information
MOARdV committed May 6, 2018
1 parent bd1f518 commit 18fd304
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion GameData/AviationLights/Plugins/AviationLights.version
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"VERSION": {
"MAJOR": 4,
"MINOR": 0,
"PATCH": 4
"PATCH": 5
},
"KSP_VERSION": {
"MAJOR": 1,
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,11 @@ added to a config file or edited in the persistent.sfs file.

## CHANGELOG

6 May 2018 - v4.0.5

* Fixed: Aviation Lights illuminate the surface of the planet (Issue #10).

***
9 April 2018 - v4.0.4

* Fixed: Flashing lights blink rapidly after warp during flight (Issue #8).
Expand Down
3 changes: 3 additions & 0 deletions Source/AviationLights.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ public void Start()
mainLight.type = (spotLight) ? LightType.Spot : LightType.Point;
mainLight.spotAngle = SpotAngle;
}
// Remove layer 10 from the cullingMask - it's the layer KSP uses to draw planets while in
// orbit, and longer distances on the lights will illuminate the surface.
mainLight.cullingMask = (mainLight.cullingMask & ~(1 << 10));

UpdateMode();

Expand Down
2 changes: 1 addition & 1 deletion Source/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("4.0.4")]
[assembly: AssemblyVersion("4.0.5")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
Expand Down

0 comments on commit 18fd304

Please sign in to comment.