-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added waiting for players skip and auto skip intro on DEBUG
- Loading branch information
Showing
13 changed files
with
127 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
NitroxModel/DataStructures/GameLogic/IntroCinematicMode.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace NitroxModel.DataStructures.GameLogic; | ||
|
||
public enum IntroCinematicMode : byte | ||
{ | ||
NONE, | ||
LOADING, | ||
WAITING, | ||
START, | ||
COMPLETED | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
NitroxPatcher/Patches/Dynamic/EscapePod_StopIntroCinematic_Patch.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System.Reflection; | ||
using HarmonyLib; | ||
using NitroxClient.GameLogic.PlayerLogic; | ||
using NitroxModel.DataStructures.GameLogic; | ||
using NitroxModel.Helper; | ||
|
||
namespace NitroxPatcher.Patches.Dynamic; | ||
|
||
public class EscapePod_StopIntroCinematic_Patch : NitroxPatch, IDynamicPatch | ||
{ | ||
private static readonly MethodInfo targetMethod = Reflect.Method((EscapePod e) => e.StopIntroCinematic(default(bool))); | ||
|
||
public static void Postfix(bool isInterrupted) | ||
{ | ||
if (isInterrupted) | ||
{ | ||
//TODO: Currently this is sent as an unauthenticated packet when skipping the intro up front (Configuration=Debug) and is therefor not processed by the server. | ||
Resolve<PlayerCinematics>().SetLocalIntroCinematicMode(IntroCinematicMode.COMPLETED); | ||
} | ||
} | ||
|
||
public override void Patch(Harmony harmony) | ||
{ | ||
PatchPostfix(harmony, targetMethod); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.