Merge branch 'planetary-features' into bwc9876/custom-ship-log

This commit is contained in:
Ben C 2022-02-06 12:11:43 -05:00
commit ed034fa3f3
2 changed files with 13 additions and 3 deletions

View File

@ -26,7 +26,12 @@ namespace NewHorizons.Atmosphere
rainGO.transform.localPosition = Vector3.zero;
var pvc = rainGO.GetComponent<PlanetaryVectionController>();
pvc.SetValue("_densityByHeight", new AnimationCurve(new Keyframe[] { new Keyframe(surfaceSize, 10f), new Keyframe(atmoSize / 2f, 0f) }));
pvc._densityByHeight = new AnimationCurve(new Keyframe[]
{
new Keyframe(surfaceSize - 0.5f, 0),
new Keyframe(surfaceSize, 10f),
new Keyframe(atmoSize, 0f)
});
rainGO.GetComponent<PlanetaryVectionController>().SetValue("_activeInSector", sector);
rainGO.GetComponent<PlanetaryVectionController>().SetValue("_exclusionSectors", new Sector[] { });
@ -45,7 +50,12 @@ namespace NewHorizons.Atmosphere
snowEmitter.transform.localPosition = Vector3.zero;
var pvc = snowEmitter.GetComponent<PlanetaryVectionController>();
pvc.SetValue("_densityByHeight", new AnimationCurve(new Keyframe[] { new Keyframe(surfaceSize, 10f), new Keyframe(atmoSize / 2f, 0f) }));
pvc._densityByHeight = new AnimationCurve(new Keyframe[]
{
new Keyframe(surfaceSize - 0.5f, 0),
new Keyframe(surfaceSize, 10f),
new Keyframe(atmoSize, 0f)
});
snowEmitter.GetComponent<PlanetaryVectionController>().SetValue("_activeInSector", sector);
snowEmitter.GetComponent<PlanetaryVectionController>().SetValue("_exclusionSectors", new Sector[] { });

View File

@ -580,7 +580,7 @@ namespace NewHorizons
}
if (body.Config.Atmosphere.HasRain || body.Config.Atmosphere.HasSnow)
EffectsBuilder.Make(go, sector, body.Config.Base.SurfaceSize, body.Config.Atmosphere.Size / 2f, body.Config.Atmosphere.HasRain, body.Config.Atmosphere.HasSnow);
EffectsBuilder.Make(go, sector, body.Config.Base.SurfaceSize, body.Config.Atmosphere.Size, body.Config.Atmosphere.HasRain, body.Config.Atmosphere.HasSnow);
if (body.Config.Atmosphere.FogSize != 0)
FogBuilder.Make(go, sector, body.Config.Atmosphere);