mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Star shock effect
This commit is contained in:
parent
657746bf5d
commit
f0163017db
@ -597,7 +597,7 @@ namespace NewHorizons.Handlers
|
|||||||
CloakBuilder.Make(go, sector, rb, body.Config.Cloak, !body.Config.ReferenceFrame.hideInMap, body.Mod);
|
CloakBuilder.Make(go, sector, rb, body.Config.Cloak, !body.Config.ReferenceFrame.hideInMap, body.Mod);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((body.Config.ShockEffect == null || body.Config.ShockEffect.hasSupernovaShockEffect) && body.Config.Star == null && body.Config.name != "Sun" && body.Config.FocalPoint == null)
|
if ((body.Config.ShockEffect == null && body.Config.Star == null && body.Config.name != "Sun" && body.Config.FocalPoint == null) || body.Config.ShockEffect?.hasSupernovaShockEffect == true)
|
||||||
{
|
{
|
||||||
SupernovaEffectBuilder.Make(go, sector, body.Config, body.Mod, procGen, ambientLight, fog, atmosphere, null, fog?._fogImpostor);
|
SupernovaEffectBuilder.Make(go, sector, body.Config, body.Mod, procGen, ambientLight, fog, atmosphere, null, fog?._fogImpostor);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,6 +57,8 @@ namespace NewHorizons.Handlers
|
|||||||
{
|
{
|
||||||
if (!IsStarActive(starEvolutionController)) continue;
|
if (!IsStarActive(starEvolutionController)) continue;
|
||||||
|
|
||||||
|
if (supernovaPlanetEffectController.transform.parent == starEvolutionController.transform.parent) continue; // If the shock effect is on a star, ignore itself
|
||||||
|
|
||||||
var distanceSqr = (supernovaPlanetEffectController.transform.position - starEvolutionController.transform.position).sqrMagnitude;
|
var distanceSqr = (supernovaPlanetEffectController.transform.position - starEvolutionController.transform.position).sqrMagnitude;
|
||||||
|
|
||||||
if (distanceSqr < (starEvolutionController.supernovaSize * starEvolutionController.supernovaSize) && distanceSqr < nearestDistanceSqr)
|
if (distanceSqr < (starEvolutionController.supernovaSize * starEvolutionController.supernovaSize) && distanceSqr < nearestDistanceSqr)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user