mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
a
This commit is contained in:
1 parent
a1c7d8f72b
commit
a3b891f906
2 files changed
+5
-10
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user