mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-19 15:51:52 +00:00
fix NoisemakerNotify
This commit is contained in:
1 parent
a3d836fdb8
commit
fc8261dee9
3 files changed
+9
-1
No files matched your search
@@ -33,6 +33,11 @@ class AntiCheat
|
||||
{
|
||||
ExtendedPlayerInfo.TimesCalledMeeting.Clear();
|
||||
}
|
||||
|
||||
if (ExtendedPlayerInfo.HasNoisemakerNotify.Any())
|
||||
{
|
||||
ExtendedPlayerInfo.HasNoisemakerNotify.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
if (GameStates.IsHost && GameStates.IsInGame)
|
||||
|
||||
@@ -3,6 +3,7 @@ namespace BetterAmongUs;
|
||||
|
||||
static class ExtendedPlayerInfo
|
||||
{
|
||||
public static List<PlayerControl> HasNoisemakerNotify = [];
|
||||
public static Dictionary<PlayerControl, float> TimeSinceKill = [];
|
||||
public static Dictionary<PlayerControl, int> TimesCalledMeeting = [];
|
||||
private static Dictionary<PlayerControl, bool> IsBetterUser = new Dictionary<PlayerControl, bool>();
|
||||
|
||||
@@ -11,11 +11,13 @@ class RolePatch
|
||||
[HarmonyPrefix]
|
||||
public static bool NotifyOfDeath_Prefix(NoisemakerRole __instance)
|
||||
{
|
||||
if (__instance.Player == null || !__instance.Player.IsAlive())
|
||||
if (ExtendedPlayerInfo.HasNoisemakerNotify.Contains(__instance.Player))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
ExtendedPlayerInfo.HasNoisemakerNotify.Add(__instance.Player);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user