Should make "worth a shot" achievement work again

This commit is contained in:
Nick J. Connors 2022-01-06 18:38:54 -05:00
parent 711bf173c7
commit b130b97504

View File

@ -69,7 +69,9 @@ namespace NewHorizons.Utility
public static bool CheckShipOutersideSolarSystem(PlayerState __instance, ref bool __result)
{
__result = false;
Transform sunTransform = Locator.GetSunTransform();
OWRigidbody shipBody = Locator.GetShipBody();
__result = sunTransform != null && shipBody != null && (sunTransform.position - shipBody.transform.position).sqrMagnitude > Main.FurthestOrbit * Main.FurthestOrbit * 4f;
return false;
}