mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Make stars not do shader stuff if luminosity is 0
This commit is contained in:
parent
7f1e52af55
commit
93a9d2c40f
@ -152,7 +152,10 @@ namespace NewHorizons.Builder.Body
|
||||
starGO.transform.localPosition = Vector3.zero;
|
||||
starGO.transform.localScale = starModule.Size * Vector3.one;
|
||||
|
||||
var starController = body.AddComponent<StarController>();
|
||||
StarController starController = null;
|
||||
if (starModule.SolarLuminosity != 0)
|
||||
{
|
||||
starController = body.AddComponent<StarController>();
|
||||
starController.Light = light;
|
||||
starController.AmbientLight = ambientLight;
|
||||
starController.FaceActiveCamera = faceActiveCamera;
|
||||
@ -160,6 +163,7 @@ namespace NewHorizons.Builder.Body
|
||||
starController.ProxyShadowLight = proxyShadowLight;
|
||||
starController.Intensity = starModule.SolarLuminosity;
|
||||
starController.SunColor = lightColour;
|
||||
}
|
||||
|
||||
if (starModule.Curve != null)
|
||||
{
|
||||
|
||||
@ -28,6 +28,8 @@ namespace NewHorizons.Utility
|
||||
|
||||
public void AddStar(StarController star)
|
||||
{
|
||||
if (star == null) return;
|
||||
|
||||
Logger.Log($"Adding new star to list: {star.gameObject.name}");
|
||||
_stars.Add(star);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user