still fixing 💀

This commit is contained in:
Gurge44 committed 2025-09-26 17:19:14 +02:00
1 parent 186f77f8b8
commit 05b2f728ca
9 files changed
+40 -18

No files matched your search

+8 -2
View File
@@ -1483,11 +1483,14 @@ internal static class ExtendedPlayerControl
{
if (!Main.Invisible.Add(player.PlayerId)) return;
if (phantom && Options.CurrentGameMode != CustomGameMode.Standard) return;
player.RpcSetPet("");
if (!(phantom && PlayerControl.LocalPlayer.IsImpostor()))
player.MakeInvisible();
if (!phantom)
{
player.MakeInvisible();
MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(player.NetId, (byte)CustomRPC.Invisibility, SendOption.Reliable);
writer.WritePacked(1);
AmongUsClient.Instance.FinishRpcImmediately(writer);
@@ -1528,11 +1531,14 @@ internal static class ExtendedPlayerControl
{
if (!Main.Invisible.Remove(player.PlayerId)) return;
if (phantom && Options.CurrentGameMode != CustomGameMode.Standard) return;
if (Options.UsePets.GetBool()) PetsHelper.SetPet(player, PetsHelper.GetPetId());
if (!(phantom && PlayerControl.LocalPlayer.IsImpostor()))
player.MakeVisible();
if (!phantom)
{
player.MakeVisible();
MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(player.NetId, (byte)CustomRPC.Invisibility, SendOption.Reliable);
writer.WritePacked(0);
AmongUsClient.Instance.FinishRpcImmediately(writer);