This commit is contained in:
Gurge44 committed 2025-05-24 15:57:42 +02:00
1 parent a1c7d8f72b
commit a3b891f906
2 files changed
+5 -10

No files matched your search

+4 -9
View File
@@ -171,6 +171,7 @@ public static class AntiBlackout
{
if (!pc.IsAlive())
{
pc.Exiled();
sender.AutoStartRpc(pc.NetId, (byte)RpcCalls.Exiled);
sender.EndRpc();
hasValue = true;
@@ -178,7 +179,7 @@ public static class AntiBlackout
}
sender.SendMessage(!hasValue);
}, 0.3f, "AntiBlackout.AfterMeetingTasks");
}, 0.3f + Utils.CalculatePingDelay(), "AntiBlackout.AfterMeetingTasks");
}
catch (Exception e) { Utils.ThrowException(e); }
}
@@ -225,20 +226,14 @@ public static class AntiBlackout
changedRoleType = roletype is RoleTypes.Impostor or RoleTypes.Shapeshifter or RoleTypes.Phantom ? RoleTypes.ImpostorGhost : RoleTypes.CrewmateGhost;
}
if (seer.AmOwner)
{
target.SetRole(changedRoleType);
continue;
}
senders[seer.PlayerId].RpcSetRole(target, changedRoleType, seer.OwnerId, noRpcForSelf: false);
hasValue[seer.PlayerId] = true;
hasValue[seer.PlayerId] = senders[seer.PlayerId].RpcSetRole(target, changedRoleType, seer.OwnerId);
RestartMessageIfTooLong(seer.PlayerId);
}
foreach (PlayerControl pc in selfExiled)
{
CustomRpcSender sender = senders[byte.MaxValue];
pc.Exiled();
sender.AutoStartRpc(pc.NetId, (byte)RpcCalls.Exiled);
sender.EndRpc();
hasValue[byte.MaxValue] = true;
+1 -1
View File
@@ -593,7 +593,7 @@ public static class CustomRpcSenderExtensions
player.Exiled();
sender.AutoStartRpc(player.NetId, (byte)RpcCalls.Exiled);
sender.EndRpc();
FixedUpdatePatch.LoversSuicide(player.PlayerId);
LateTask.New(() => FixedUpdatePatch.LoversSuicide(player.PlayerId), Utils.CalculatePingDelay() * 2f, log: false);
}
public static bool Notify(this CustomRpcSender sender, PlayerControl pc, string text, float time = 6f, bool overrideAll = false, bool log = true, bool setName = true)