mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-19 15:51:58 +00:00
few fixes
This commit is contained in:
1 parent
ed6ebed013
commit
bedb16d1a1
7 files changed
+49
-23
No files matched your search
+10
-1
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using AmongUs.GameOptions;
|
||||
using EHR.Modules;
|
||||
@@ -510,6 +511,8 @@ public static class Deathrace
|
||||
|
||||
public static class FixedUpdatePatch
|
||||
{
|
||||
private static Stopwatch NotifyTimer = new();
|
||||
|
||||
public static void Postfix()
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost || !GameGoing || GameStates.IsEnded) return;
|
||||
@@ -612,6 +615,12 @@ public static class Deathrace
|
||||
}
|
||||
|
||||
Data.Remove(removeId);
|
||||
|
||||
if (NotifyTimer.Elapsed.TotalSeconds >= 1)
|
||||
{
|
||||
NotifyTimer.Reset();
|
||||
Utils.NotifyRoles();
|
||||
}
|
||||
}
|
||||
|
||||
private static void CheckAndNotify(PlayerData data)
|
||||
@@ -620,7 +629,7 @@ public static class Deathrace
|
||||
|
||||
if (data.LastSuffix != suffix)
|
||||
{
|
||||
Utils.NotifyRoles(SpecifySeer: data.Player, SpecifyTarget: data.Player);
|
||||
NotifyTimer.Start();
|
||||
data.LastSuffix = suffix;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user