mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-20 01:46:15 +00:00
sync gamemode on join
This commit is contained in:
1 parent
ae45c506cb
commit
9606871cbe
2 files changed
+4
-2
No files matched your search
@@ -111,7 +111,7 @@ public static class GameModeOption
|
||||
__instance.RefreshOptions(CustomGameModeManager.ActiveMode);
|
||||
}
|
||||
|
||||
public static void Set(int val)
|
||||
private static void Set(int val)
|
||||
{
|
||||
Value = val;
|
||||
CustomGameModeManager.GetAndSetGameMode();
|
||||
@@ -322,7 +322,7 @@ public static class GameModeOption
|
||||
}
|
||||
|
||||
[MethodRpc((uint) MiraRpc.SyncGamemodeOption)]
|
||||
private static void RpcSyncGamemode(PlayerControl host, int data)
|
||||
internal static void RpcSyncGamemode(PlayerControl host, int data)
|
||||
{
|
||||
Set(data);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using InnerNet;
|
||||
using MiraAPI.Events;
|
||||
using MiraAPI.Events.Vanilla.Player;
|
||||
using MiraAPI.GameModes;
|
||||
using MiraAPI.GameOptions;
|
||||
using MiraAPI.Roles;
|
||||
|
||||
@@ -32,6 +33,7 @@ internal static class AmongUsClientSyncPatch
|
||||
|
||||
ModdedOptionsManager.SyncAllOptions(clientData.Id);
|
||||
CustomRoleManager.SyncAllRoleSettings(clientData.Id);
|
||||
GameModeOption.RpcSyncGamemode(PlayerControl.LocalPlayer, GameModeOption.Value);
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
|
||||
Reference in new issue
Block a user