Skip to content

Commit

Permalink
Force a game quit when pushing quit. This is a temporary measure to u…
Browse files Browse the repository at this point in the history
…nblock our release which has several outstanding stateful bugs associated with previous game data persisting after disconnect.
  • Loading branch information
Sunrunner37 committed Mar 4, 2020
1 parent 69037a4 commit d8ce66a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion NitroxPatcher/Patches/Dynamic/IngameMenu_QuitGame_Patch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Harmony;
using NitroxClient.Communication.Abstract;
using NitroxModel.Core;
using UnityEngine;

namespace NitroxPatcher.Patches.Dynamic
{
Expand All @@ -13,8 +14,9 @@ public class IngameMenu_QuitGame_Patch : NitroxPatch, IDynamicPatch

public static void Prefix()
{
IMultiplayerSession multiplayerSession = NitroxServiceLocator.LocateService<IMultiplayerSession>();
IMultiplayerSession multiplayerSession = NitroxServiceLocator.LocateService<IMultiplayerSession>();
multiplayerSession.Disconnect();
Application.Quit();
}

public override void Patch(HarmonyInstance harmony)
Expand Down

0 comments on commit d8ce66a

Please sign in to comment.