mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fix supernova proxy rendering when it shouldnt
This commit is contained in:
parent
be23f852fd
commit
6b27384a41
@ -5,6 +5,7 @@ using NewHorizons.Utility.OuterWilds;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NewHorizons.Components
|
||||
{
|
||||
public class NHProxy : ProxyPlanet
|
||||
|
||||
@ -364,7 +364,10 @@ namespace NewHorizons.Components.SizeControllers
|
||||
_surface._materials[0].CopyPropertiesFromMaterial(_collapseStartSurfaceMaterial);
|
||||
if (oneShotSource != null && !PlayerState.IsSleepingAtCampfire() && !PlayerState.InDreamWorld()) oneShotSource.PlayOneShot(AudioType.Sun_Collapse);
|
||||
|
||||
if (_proxy != null) _proxy.StartCollapse();
|
||||
if (_proxy != null)
|
||||
{
|
||||
_proxy.StartCollapse();
|
||||
}
|
||||
}
|
||||
|
||||
public void StopCollapse()
|
||||
@ -396,7 +399,14 @@ namespace NewHorizons.Components.SizeControllers
|
||||
if (planetDestructionVolume != null) planetDestructionVolume._deathType = DeathType.Supernova;
|
||||
if (oneShotSource != null && !PlayerState.IsSleepingAtCampfire() && !PlayerState.InDreamWorld()) oneShotSource.PlayOneShot(AudioType.Sun_Explosion);
|
||||
|
||||
if (_proxy != null) _proxy.StartSupernova();
|
||||
if (_proxy != null)
|
||||
{
|
||||
_proxy.StartSupernova();
|
||||
|
||||
// When the supernova starts some effects start on, we have to refresh their states
|
||||
var nhproxy = _proxy.GetComponentInParent<NHProxy>();
|
||||
nhproxy.ToggleRendering(!nhproxy._outOfRange);
|
||||
}
|
||||
}
|
||||
|
||||
public void StopSupernova()
|
||||
|
||||
@ -98,7 +98,10 @@ namespace NewHorizons.Components.Stars
|
||||
|
||||
public void SetParticlesVisibility(bool visible)
|
||||
{
|
||||
foreach (var particleRenderer in _cachedParticleRenderers) particleRenderer.enabled = visible;
|
||||
foreach (var particleRenderer in _cachedParticleRenderers)
|
||||
{
|
||||
particleRenderer.enabled = visible;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetRenderingEnabled(bool renderingEnabled)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user