mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
block nhmc exiled
This commit is contained in:
1 parent
753e28d312
commit
43e5720a70
2 files changed
+4
No files matched your search
@@ -875,6 +875,7 @@ public static class CustomRpcSenderExtensions
|
||||
|
||||
public bool RpcExiled(PlayerControl target, bool autoStartRpc = true, int targetClientId = -1, bool exileForHost = true)
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost) return false;
|
||||
if (exileForHost) target.Exiled();
|
||||
if (autoStartRpc) sender.AutoStartRpc(target.NetId, RpcCalls.Exiled, targetClientId).EndRpc();
|
||||
else sender.StartRpc(target.NetId, RpcCalls.Exiled).EndRpc();
|
||||
@@ -883,6 +884,7 @@ public static class CustomRpcSenderExtensions
|
||||
|
||||
public bool RpcExileV2(PlayerControl target, bool autoStartRpc = true, int targetClientId = -1, bool exileForHost = true)
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost) return false;
|
||||
sender.RpcExiled(target, autoStartRpc, targetClientId, exileForHost);
|
||||
FixedUpdatePatch.LoversSuicide(target.PlayerId);
|
||||
return true;
|
||||
|
||||
@@ -1923,6 +1923,7 @@ internal static class ExtendedPlayerControl
|
||||
|
||||
public void RpcExiled()
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost) return;
|
||||
player.Exiled();
|
||||
MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(player.NetId, (byte)RpcCalls.Exiled, SendOption.Reliable);
|
||||
AmongUsClient.Instance.FinishRpcImmediately(writer);
|
||||
@@ -1930,6 +1931,7 @@ internal static class ExtendedPlayerControl
|
||||
|
||||
public void RpcExileV2()
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost) return;
|
||||
player.RpcExiled();
|
||||
FixedUpdatePatch.LoversSuicide(player.PlayerId);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user