Fix defaultPrimaryToSun

This commit is contained in:
Nick 2023-08-24 14:35:34 -04:00
parent 98f3cda8f1
commit b912593ed1

View File

@ -391,7 +391,8 @@ namespace NewHorizons.Handlers
if (defaultPrimaryToSun)
{
NHLogger.LogError($"Couldn't find {body.Config.Orbit.primaryBody}, defaulting to center of solar system");
primaryBody = Locator.GetCenterOfTheUniverse().GetAttachedOWRigidbody().GetComponent<AstroObject>();
// TODO: Make this work in other systems. We tried using Locator.GetCenterOfUniverse before but that doesn't work since its too early now
primaryBody = SearchUtilities.Find("Sun_Body")?.GetComponent<AstroObject>();
}
else
{