mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +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();
|
ExtendedPlayerInfo.TimesCalledMeeting.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ExtendedPlayerInfo.HasNoisemakerNotify.Any())
|
||||||
|
{
|
||||||
|
ExtendedPlayerInfo.HasNoisemakerNotify.Clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GameStates.IsHost && GameStates.IsInGame)
|
if (GameStates.IsHost && GameStates.IsInGame)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ namespace BetterAmongUs;
|
|||||||
|
|
||||||
static class ExtendedPlayerInfo
|
static class ExtendedPlayerInfo
|
||||||
{
|
{
|
||||||
|
public static List<PlayerControl> HasNoisemakerNotify = [];
|
||||||
public static Dictionary<PlayerControl, float> TimeSinceKill = [];
|
public static Dictionary<PlayerControl, float> TimeSinceKill = [];
|
||||||
public static Dictionary<PlayerControl, int> TimesCalledMeeting = [];
|
public static Dictionary<PlayerControl, int> TimesCalledMeeting = [];
|
||||||
private static Dictionary<PlayerControl, bool> IsBetterUser = new Dictionary<PlayerControl, bool>();
|
private static Dictionary<PlayerControl, bool> IsBetterUser = new Dictionary<PlayerControl, bool>();
|
||||||
|
|||||||
@@ -11,11 +11,13 @@ class RolePatch
|
|||||||
[HarmonyPrefix]
|
[HarmonyPrefix]
|
||||||
public static bool NotifyOfDeath_Prefix(NoisemakerRole __instance)
|
public static bool NotifyOfDeath_Prefix(NoisemakerRole __instance)
|
||||||
{
|
{
|
||||||
if (__instance.Player == null || !__instance.Player.IsAlive())
|
if (ExtendedPlayerInfo.HasNoisemakerNotify.Contains(__instance.Player))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ExtendedPlayerInfo.HasNoisemakerNotify.Add(__instance.Player);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user