mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Turn on remnant after supernova
This commit is contained in:
parent
0d60e5ee8b
commit
135794fa29
@ -257,25 +257,13 @@ namespace NewHorizons.Components.SizeControllers
|
||||
|
||||
private void DisableStar(bool start = false)
|
||||
{
|
||||
if (_rigidbody != null)
|
||||
{
|
||||
ReferenceFrameTracker referenceFrameTracker = Locator.GetPlayerBody().GetComponent<ReferenceFrameTracker>();
|
||||
if (referenceFrameTracker.GetReferenceFrame() != null && referenceFrameTracker.GetReferenceFrame().GetOWRigidBody() == _rigidbody) referenceFrameTracker.UntargetReferenceFrame();
|
||||
_rigidbody._isTargetable = false;
|
||||
if (_rigidbody._attachedRFVolume != null)
|
||||
{
|
||||
_rigidbody._attachedRFVolume._minColliderRadius = 0;
|
||||
_rigidbody._attachedRFVolume._maxColliderRadius = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (_mapMarker != null) _mapMarker.DisableMarker();
|
||||
|
||||
if (controller != null) StarLightController.RemoveStar(controller);
|
||||
|
||||
// Just turn off the star entirely
|
||||
base.gameObject.SetActive(false);
|
||||
|
||||
if (_stellarRemnantController != null) _stellarRemnantController.gameObject.SetActive(true);
|
||||
|
||||
if (start && _planetDestructionVolume != null)
|
||||
{
|
||||
foreach (var collider in Physics.OverlapSphere(_planetDestructionVolume.transform.position, _planetDestructionVolume.GetComponent<SphereCollider>().radius * supernovaSize * 0.9f))
|
||||
|
||||
@ -215,6 +215,8 @@ namespace NewHorizons.Handlers
|
||||
stellarRemnantController.SetStarEvolutionController(starEvolutionController);
|
||||
starEvolutionController.SetStellarRemnantController(stellarRemnantController);
|
||||
|
||||
sector.gameObject.SetActive(false);
|
||||
|
||||
SharedGenerateBody(body, existingPlanet, sector, rb);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user