Fix supernova effect

This commit is contained in:
TerrificTrifid 2023-02-25 18:42:47 -06:00
parent d482ff60ea
commit 0a2e4a096b

View File

@ -60,9 +60,9 @@ namespace NewHorizons.Builder.Body
var supernovaEffectController = supernovaController.AddComponent<NHSupernovaPlanetEffectController>(); var supernovaEffectController = supernovaController.AddComponent<NHSupernovaPlanetEffectController>();
if (ambientLight != null) if (ambientLight != null)
{ {
currentController._ambientLight = ambientLight; supernovaEffectController._ambientLight = ambientLight;
currentController._ambientLightOrigIntensity = new float[ambientLight.Length]; supernovaEffectController._ambientLightOrigIntensity = new float[ambientLight.Length];
for (int i = 0; i < ambientLight.Length; i++) currentController._ambientLightOrigIntensity[i] = ambientLight[i].intensity; for (int i = 0; i < ambientLight.Length; i++) supernovaEffectController._ambientLightOrigIntensity[i] = ambientLight[i].intensity;
} }
if (config.Atmosphere != null && config.Atmosphere.atmosphereSunIntensity != 0) supernovaEffectController._atmosphereOrigSunIntensity = config.Atmosphere.atmosphereSunIntensity; if (config.Atmosphere != null && config.Atmosphere.atmosphereSunIntensity != 0) supernovaEffectController._atmosphereOrigSunIntensity = config.Atmosphere.atmosphereSunIntensity;
supernovaEffectController._atmosphere = atmosphere; supernovaEffectController._atmosphere = atmosphere;