Use cloud height for effects

This commit is contained in:
TerrificTrifid 2022-09-03 15:19:08 -05:00
parent d6b91acce5
commit 1c67f9ce7f

View File

@ -21,7 +21,6 @@ namespace NewHorizons.Builder.Atmosphere
SCG._waitForStreaming = false;
var minHeight = surfaceSize;
var maxHeight = config.Atmosphere.size;
if (config.HeightMap?.minHeight != null)
{
if (config.Water?.size >= config.HeightMap.minHeight) minHeight = config.Water.size; // use sea level if its higher
@ -30,6 +29,9 @@ namespace NewHorizons.Builder.Atmosphere
else if (config.Water?.size != null) minHeight = config.Water.size;
else if (config.Lava?.size != null) minHeight = config.Lava.size;
var maxHeight = config.Atmosphere.size;
if (config.Atmosphere.clouds?.outerCloudRadius != null) maxHeight = config.Atmosphere.clouds.outerCloudRadius;
if (config.Atmosphere.hasRain)
{
var rainGO = GameObject.Instantiate(SearchUtilities.Find("GiantsDeep_Body/Sector_GD/Sector_GDInterior/Effects_GDInterior/Effects_GD_Rain"), effectsGO.transform);