diff --git a/NewHorizons/Components/SizeControllers/StarEvolutionController.cs b/NewHorizons/Components/SizeControllers/StarEvolutionController.cs index 296884be..0029ac06 100644 --- a/NewHorizons/Components/SizeControllers/StarEvolutionController.cs +++ b/NewHorizons/Components/SizeControllers/StarEvolutionController.cs @@ -257,25 +257,13 @@ namespace NewHorizons.Components.SizeControllers private void DisableStar(bool start = false) { - if (_rigidbody != null) - { - ReferenceFrameTracker referenceFrameTracker = Locator.GetPlayerBody().GetComponent(); - 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().radius * supernovaSize * 0.9f)) diff --git a/NewHorizons/Handlers/PlanetCreationHandler.cs b/NewHorizons/Handlers/PlanetCreationHandler.cs index 7079e4b6..47f13001 100644 --- a/NewHorizons/Handlers/PlanetCreationHandler.cs +++ b/NewHorizons/Handlers/PlanetCreationHandler.cs @@ -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)