mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
aaaaaaaaaaaaaaaaaaaaaaaa
This commit is contained in:
1 parent
f934c9f7c9
commit
e83be1ae8f
2 files changed
+5
-5
No files matched your search
@@ -450,9 +450,9 @@ public static class CollectionExtensions
|
||||
return collection.SelectMany(x => x);
|
||||
}
|
||||
|
||||
public static void NotifyPlayers(this IEnumerable<PlayerControl> players, string text, float time = 6f, bool overrideAll = false, bool log = true, bool setName = true)
|
||||
public static void NotifyPlayers(this IEnumerable<PlayerControl> 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<PlayerControl> players, string text, float time = 6f, bool overrideAll = false, bool log = true, bool setName = true)
|
||||
public static void NotifyPlayers(this List<PlayerControl> 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++)
|
||||
|
||||
@@ -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(() =>
|
||||
|
||||
Reference in new issue
Block a user