diff --git a/NewHorizons/Tools/Patches.cs b/NewHorizons/Tools/Patches.cs index 23df6941..4e32af97 100644 --- a/NewHorizons/Tools/Patches.cs +++ b/NewHorizons/Tools/Patches.cs @@ -68,9 +68,12 @@ namespace NewHorizons.Tools public static bool CheckShipOutersideSolarSystem(PlayerState __instance, ref bool __result) { + if (PlayerState._inBrambleDimension) return 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; + var maxDist2 = Mathf.Max(900000000f, Main.FurthestOrbit * Main.FurthestOrbit * 2f); + __result = sunTransform != null && shipBody != null && (sunTransform.position - shipBody.transform.position).sqrMagnitude > maxDist2; return false; }