diff --git a/Modules/Extensions/CollectionExtensions.cs b/Modules/Extensions/CollectionExtensions.cs index d64557a86..4aaaa5342 100644 --- a/Modules/Extensions/CollectionExtensions.cs +++ b/Modules/Extensions/CollectionExtensions.cs @@ -450,9 +450,9 @@ public static class CollectionExtensions return collection.SelectMany(x => x); } - public static void NotifyPlayers(this IEnumerable players, string text, float time = 6f, bool overrideAll = false, bool log = true, bool setName = true) + public static void NotifyPlayers(this IEnumerable players, string text, float time = 6f, bool overrideAll = false, bool log = true, bool setName = true, SendOption sendOption = SendOption.Reliable) { - var sender = CustomRpcSender.Create("NotifyPlayers", SendOption.Reliable).StartPackedMessage(); + var sender = CustomRpcSender.Create("NotifyPlayers", sendOption).StartPackedMessage(); var hasValue = false; foreach (PlayerControl player in players) @@ -463,9 +463,9 @@ public static class CollectionExtensions sender.SendMessage(dispose: !hasValue || sender.stream.Length <= 11); } - public static void NotifyPlayers(this List players, string text, float time = 6f, bool overrideAll = false, bool log = true, bool setName = true) + public static void NotifyPlayers(this List players, string text, float time = 6f, bool overrideAll = false, bool log = true, bool setName = true, SendOption sendOption = SendOption.Reliable) { - var sender = CustomRpcSender.Create("NotifyPlayers", SendOption.Reliable).StartPackedMessage(); + var sender = CustomRpcSender.Create("NotifyPlayers", sendOption).StartPackedMessage(); var hasValue = false; for (int index = 0; index < players.Count; index++) diff --git a/Patches/ExilePatch.cs b/Patches/ExilePatch.cs index 0c6d762c8..60eebade4 100644 --- a/Patches/ExilePatch.cs +++ b/Patches/ExilePatch.cs @@ -173,7 +173,7 @@ internal static class ExileControllerWrapUpPatch if (Options.EnableGameTimeLimit.GetBool()) finalText += $"\n<#888888>{Options.GameTimeLimit.GetInt() - Main.GameTimer.Elapsed.TotalSeconds:N0}s {Translator.GetString("RemainingText.Suffix")}"; if (!string.IsNullOrWhiteSpace(finalText)) - Main.EnumerateAlivePlayerControls().NotifyPlayers(finalText, 13f); + Main.EnumerateAlivePlayerControls().NotifyPlayers(finalText, 13f, setName: false, sendOption: ejectionNotify ? SendOption.None : SendOption.Reliable); } LateTask.New(() =>