mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
fix Chat Notifications, its about time lmao
This commit is contained in:
1 parent
df041a86ad
commit
3483db6125
2 files changed
+7
-7
No files matched your search
@@ -6,11 +6,11 @@ namespace BetterAmongUs.Patches;
|
||||
[HarmonyPatch(typeof(ChatNotification))]
|
||||
internal class ChatNotificationPatch
|
||||
{
|
||||
[HarmonyPatch(nameof(ChatNotification.Update))]
|
||||
[HarmonyPatch(nameof(ChatNotification.SetUp))]
|
||||
[HarmonyPostfix]
|
||||
internal static void Update_Postfix(ChatNotification __instance)
|
||||
internal static void SetUp_Postfix(ChatNotification __instance)
|
||||
{
|
||||
__instance.GetComponent<AspectPosition>().DistanceFromEdge = new Vector3(-2.8f, 0.3f, -40f);
|
||||
__instance.transform.localScale = new Vector3(0.45f, 0.42f);
|
||||
__instance.transform.localScale = new Vector3(0.45f, 0.42f, 1f);
|
||||
}
|
||||
}
|
||||
@@ -198,8 +198,8 @@ internal class ClientPatch
|
||||
}
|
||||
else if (!client.IsReady)
|
||||
{
|
||||
int readyClients = clients.Count(c => c.IsReady);
|
||||
int totalClients = clients.Length;
|
||||
int readyClients = clients.Count(c => c?.Character != null && c.IsReady);
|
||||
int totalClients = clients.Count(c => c?.Character != null);
|
||||
|
||||
loadingText = $"Waiting for Players ({readyClients}/{totalClients})";
|
||||
progress = 0.8f + (0.2f * readyClients / Mathf.Max(1, totalClients));
|
||||
@@ -252,8 +252,8 @@ internal class ClientPatch
|
||||
}
|
||||
else
|
||||
{
|
||||
int readyClients = clients.Count(c => c.IsReady);
|
||||
int totalClients = clients.Length;
|
||||
int readyClients = clients.Count(c => c?.Character != null && c.IsReady);
|
||||
int totalClients = clients.Count(c => c?.Character != null);
|
||||
|
||||
loadingText = $"Waiting for Players ({readyClients}/{totalClients})";
|
||||
progress = 0.85f + (0.15f * readyClients / Mathf.Max(1, totalClients));
|
||||
|
||||
Reference in new issue
Block a user