mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-21 21:43:26 +00:00
Vanilla roles no longer bypass murder cancels
This commit is contained in:
1 parent
bf9b34e728
commit
e1ca50be3e
2 files changed
+2
-7
No files matched your search
@@ -87,11 +87,11 @@ public static class CustomMurderRpc
|
||||
bool playKillSound = true)
|
||||
{
|
||||
source.isKilling = false;
|
||||
var data = target.Data;
|
||||
if (resultFlags.HasFlag(MurderResultFlags.FailedError))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var data = target.Data;
|
||||
|
||||
if (resultFlags.HasFlag(MurderResultFlags.FailedProtected) ||
|
||||
(resultFlags.HasFlag(MurderResultFlags.DecisionByHost) && target.protectedByGuardianId > -1))
|
||||
|
||||
@@ -46,7 +46,7 @@ public static class KillButtonPatches
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Use Custom Murder if player is custom role.
|
||||
/// Use Custom Murder instead of Murder Player from vanilla.
|
||||
/// </summary>
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(nameof(KillButton.DoClick))]
|
||||
@@ -58,11 +58,6 @@ public static class KillButtonPatches
|
||||
return false;
|
||||
}
|
||||
|
||||
if (PlayerControl.LocalPlayer.Data.Role is not ICustomRole)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
PlayerControl.LocalPlayer.RpcCustomMurder(__instance.currentTarget);
|
||||
__instance.SetTarget(null);
|
||||
|
||||
|
||||
Reference in new issue
Block a user