mirror of
https://github.com/ApeMV/AmongUsRevamped.git
synced 2026-10-20 01:46:28 +00:00
Setting fallbacks, GitHub templates, GM fix
This commit is contained in:
1 parent
f18dc3fa31
commit
f4d9d8101f
10 files changed
+77
-32
No files matched your search
+1
-11
@@ -128,8 +128,8 @@ public static class FixedUpdate
|
||||
if (p.protectedByGuardianId == -1)
|
||||
{
|
||||
p.RpcProtectPlayer(p, p.cosmetics.ColorId);
|
||||
p.Data.MarkDirty();
|
||||
}
|
||||
p.Data.MarkDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -270,16 +270,6 @@ class FixedUpdateInGamePatch
|
||||
NormalGameEndChecker.CheckWinnerText("PnSTimer");
|
||||
}
|
||||
}
|
||||
|
||||
if ((Options.SNSChatInGameFast.GetBool() && Options.Gamemode.GetValue() == 1) || (Options.PNSChatInGameFast.GetBool() && Options.Gamemode.GetValue() == 3))
|
||||
{
|
||||
if (Main.GM.Value && !Utils.IsDead)
|
||||
{
|
||||
Logger.Info($" Game Master Successful", "StartGame");
|
||||
PlayerControl.LocalPlayer.Exiled();
|
||||
PlayerControl.LocalPlayer.RpcSetRole(RoleTypes.CrewmateGhost);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,8 @@ namespace AmongUsRevamped;
|
||||
|
||||
public static class OptionManager
|
||||
{
|
||||
private static OptionBackupData CachedOptions;
|
||||
private static float OldKillCooldown;
|
||||
|
||||
public static void SyncGameOptions()
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost) return;
|
||||
@@ -29,17 +30,19 @@ public static class OptionManager
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost) return;
|
||||
|
||||
CachedOptions = new OptionBackupData(GameOptionsManager.Instance.CurrentGameOptions);
|
||||
OldKillCooldown = Main.NormalOptions.KillCooldown;
|
||||
}
|
||||
|
||||
public static void RestoreOptions()
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost || CachedOptions == null) return;
|
||||
|
||||
var restored = CachedOptions.Restore(GameOptionsManager.Instance.CurrentGameOptions);
|
||||
|
||||
GameOptionsManager.Instance.CurrentGameOptions = restored;
|
||||
if (!AmongUsClient.Instance.AmHost) return;
|
||||
|
||||
if (Main.NormalOptions.KillCooldown != OldKillCooldown)
|
||||
{
|
||||
Main.NormalOptions.KillCooldown = OldKillCooldown;
|
||||
Logger.Info("Force overrided Kill Cooldown back to original", "RestoreOptions");
|
||||
}
|
||||
|
||||
SyncGameOptions();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user