Skip to content

Commit

Permalink
Fix compile error.
Browse files Browse the repository at this point in the history
  • Loading branch information
miru-y committed Dec 6, 2022
1 parent 74a5b17 commit 513eba7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions TheOtherRoles/Patches/EndGamePatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ public static void Postfix(EndGameManager __instance)
}

[HarmonyPatch(typeof(ShipStatus), nameof(ShipStatus.CheckEndCriteria))]
class CheckEndCriteriaPatch
public class CheckEndCriteriaPatch
{
public static bool Prefix(ShipStatus __instance)
{
Expand Down Expand Up @@ -760,6 +760,15 @@ public static bool Prefix(ShipStatus __instance)
return false;
}

public static void UncheckedEndGame(GameOverReason reason, bool never_used)
{
MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId,
(byte)CustomRPC.UncheckedEndGame, Hazel.SendOption.Reliable, -1);
writer.Write((byte)reason);
AmongUsClient.Instance.FinishRpcImmediately(writer);
RPCProcedure.uncheckedEndGame((byte)reason);
}

// Task Vs Mode
private static bool CheckAndEndGameForTaskVsModeEnd(ShipStatus __instance)
{
Expand Down Expand Up @@ -968,15 +977,6 @@ private static void EndGameForSabotage(ShipStatus __instance)
return;
}

private static void UncheckedEndGame(GameOverReason reason, bool never_used)
{
MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId,
(byte)CustomRPC.UncheckedEndGame, Hazel.SendOption.Reliable, -1);
writer.Write((byte)reason);
AmongUsClient.Instance.FinishRpcImmediately(writer);
RPCProcedure.uncheckedEndGame((byte)reason);
}

private static void UncheckedEndGame(CustomGameOverReason reason)
{
UncheckedEndGame((GameOverReason)CheckCustomGameOverReason(reason), false);
Expand Down

0 comments on commit 513eba7

Please sign in to comment.