Revert "Don't just cut to black"

This reverts commit bddcd88b1665ee07aef98c7adab8b1ae3fe86b68.
This commit is contained in:
JohnCorby 2024-06-04 09:25:55 -07:00
parent af256ac164
commit 02642983b5
2 changed files with 4 additions and 8 deletions

View File

@ -25,14 +25,12 @@ namespace NewHorizons.Handlers
yield return new WaitForEndOfFrame(); yield return new WaitForEndOfFrame();
} }
public static void FadeThen(float length, float totalTime, Action action) => Delay.StartCoroutine(FadeThenCoroutine(length, totalTime, action)); public static void FadeThen(float length, Action action) => Delay.StartCoroutine(FadeThenCoroutine(length, action));
private static IEnumerator FadeThenCoroutine(float length, float totalTime, Action action) private static IEnumerator FadeThenCoroutine(float length, Action action)
{ {
yield return FadeOutCoroutine(length); yield return FadeOutCoroutine(length);
yield return new WaitForSeconds(totalTime - length);
action?.Invoke(); action?.Invoke();
} }
} }

View File

@ -970,13 +970,11 @@ namespace NewHorizons
OWInput.ChangeInputMode(InputMode.None); OWInput.ChangeInputMode(InputMode.None);
// Hide unloading // Hide unloading
// When warping with the ship or vessel there are graphical effects we want to see! Do not pause immediately or cut to black immediately ManualOnStartSceneLoad(sceneToLoad);
// Otherwise we fade to black much quicker. Still wait a bit for the sound effects to finish FadeHandler.FadeThen(1f, () =>
FadeHandler.FadeThen(IsWarpingFromShip || IsWarpingFromVessel ? 1f : 0.2f, 1.2f, () =>
{ {
// Slide reel unloading is tied to being removed from the sector, so we do that here to prevent a softlock // Slide reel unloading is tied to being removed from the sector, so we do that here to prevent a softlock
Locator.GetPlayerSectorDetector().RemoveFromAllSectors(); Locator.GetPlayerSectorDetector().RemoveFromAllSectors();
ManualOnStartSceneLoad(sceneToLoad);
LoadManager.LoadSceneImmediate(sceneToLoad); LoadManager.LoadSceneImmediate(sceneToLoad);
}); });
} }