diff --git a/NitroxPatcher/Patches/Dynamic/uGUI_SceneIntro_IntroSequence_Patch.cs b/NitroxPatcher/Patches/Dynamic/uGUI_SceneIntro_IntroSequence_Patch.cs index ba55a51c9..ccf17f6b9 100644 --- a/NitroxPatcher/Patches/Dynamic/uGUI_SceneIntro_IntroSequence_Patch.cs +++ b/NitroxPatcher/Patches/Dynamic/uGUI_SceneIntro_IntroSequence_Patch.cs @@ -18,7 +18,14 @@ public sealed partial class uGUI_SceneIntro_IntroSequence_Patch : NitroxPatch, I public static IEnumerable Transpiler(IEnumerable instructions) { return new CodeMatcher(instructions) - // Override AnyKeyDown check + // Replace LargeWorldStreamer.Main.IsWorldSettled() check with IsWorldSettledAndInitialSyncCompleted() + .MatchStartForward( + new CodeMatch(OpCodes.Ldsfld, Reflect.Field(() => LargeWorldStreamer.main)), + new CodeMatch(OpCodes.Callvirt, Reflect.Method((LargeWorldStreamer lws) => lws.IsWorldSettled())) + ) + .SetAndAdvance(OpCodes.Call, Reflect.Method(() => IsWorldSettledAndInitialSyncCompleted())) + .RemoveInstruction() + // Replace GameInput.AnyKeyDown() check with AnyKeyDownOrModeCompleted() .MatchEndForward( new CodeMatch(OpCodes.Call, Reflect.Method(() => GameInput.AnyKeyDown())) ) @@ -75,9 +82,13 @@ public static IEnumerable Transpiler(IEnumerable().IntroCinematicMode == IntroCinematicMode.COMPLETED; @@ -103,13 +114,7 @@ private static bool IsRemoteCinematicReady(uGUI_SceneIntro uGuiSceneIntro) return false; } - if (!packetSend && !readyToSend && Multiplayer.Main && Multiplayer.Main.InitialSyncCompleted) - { - readyToSend = true; - return false; - } - - if (!packetSend && readyToSend) + if (!packetSend) { uGuiSceneIntro.skipHintStartTime = Time.time; uGuiSceneIntro.mainText.SetText(Language.main.GetFormat("Nitrox_IntroWaitingPartner", uGUI.FormatButton(GameInput.Button.UIMenu)));