diff --git a/NitroxPatcher/Patches/Dynamic/IngameMenu_QuitGame_Patch.cs b/NitroxPatcher/Patches/Dynamic/IngameMenu_QuitGame_Patch.cs index 4eb5e76d3d..a4f3da4a99 100644 --- a/NitroxPatcher/Patches/Dynamic/IngameMenu_QuitGame_Patch.cs +++ b/NitroxPatcher/Patches/Dynamic/IngameMenu_QuitGame_Patch.cs @@ -3,6 +3,7 @@ using Harmony; using NitroxClient.Communication.Abstract; using NitroxModel.Core; +using UnityEngine; namespace NitroxPatcher.Patches.Dynamic { @@ -13,8 +14,9 @@ public class IngameMenu_QuitGame_Patch : NitroxPatch, IDynamicPatch public static void Prefix() { - IMultiplayerSession multiplayerSession = NitroxServiceLocator.LocateService(); + IMultiplayerSession multiplayerSession = NitroxServiceLocator.LocateService(); multiplayerSession.Disconnect(); + Application.Quit(); } public override void Patch(HarmonyInstance harmony)