mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Don't save relative location for now
This commit is contained in:
parent
f899b65eef
commit
91ff901972
@ -15,16 +15,25 @@ namespace NewHorizons.Patches
|
||||
return true;
|
||||
}
|
||||
|
||||
// TODO: Figure out what causes player to fall through vessel when warping. Saving relative location will be disabled until then.
|
||||
public static bool saveRelativeLocation = false;
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(VesselWarpController), nameof(VesselWarpController.WarpVessel))]
|
||||
public static bool VesselWarpController_WarpVessel(VesselWarpController __instance, bool debugWarp)
|
||||
{
|
||||
if (!Main.Instance.IsWarpingFromVessel && TimeLoop.GetLoopCount() < 2)
|
||||
Achievements.Earn(Achievements.Type.BEGINNERS_LUCK);
|
||||
VesselWarpController.s_playerWarpLocation = new RelativeLocationData(Locator.GetPlayerBody(), __instance.transform);
|
||||
VesselWarpController.s_relativeLocationSaved = !debugWarp;
|
||||
|
||||
if (saveRelativeLocation)
|
||||
{
|
||||
VesselWarpController.s_playerWarpLocation = new RelativeLocationData(Locator.GetPlayerBody(), __instance.transform);
|
||||
VesselWarpController.s_relativeLocationSaved = !debugWarp;
|
||||
}
|
||||
|
||||
if (!Main.Instance.IsWarpingFromVessel)
|
||||
PlayerData.SaveWarpedToTheEye(TimeLoopUtilities.GetVanillaSecondsRemaining());
|
||||
|
||||
LoadManager.EnableAsyncLoadTransition();
|
||||
return false;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user