From bd8d7a3208e1dbe02f0d4ed196700197302ee05c Mon Sep 17 00:00:00 2001 From: Atony <75191600+AtonyGit@users.noreply.github.com> Date: Tue, 10 Feb 2026 14:00:47 -0600 Subject: [PATCH 1/2] Add lobby checks for kills --- MiraAPI/Networking/CustomMurderRpc.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/MiraAPI/Networking/CustomMurderRpc.cs b/MiraAPI/Networking/CustomMurderRpc.cs index 329b7dd..7629ebc 100644 --- a/MiraAPI/Networking/CustomMurderRpc.cs +++ b/MiraAPI/Networking/CustomMurderRpc.cs @@ -77,6 +77,10 @@ public static class CustomMurderRpc bool showKillAnim = true, bool playKillSound = true) { + if (LobbyBehaviour.Instance) + { + return; + } var murderResultFlags = didSucceed ? MurderResultFlags.Succeeded : MurderResultFlags.FailedError; var beforeMurderEvent = new BeforeMurderEvent(source, target, inMeeting); @@ -126,7 +130,7 @@ public static class CustomMurderRpc bool playKillSound = true) { source.isKilling = false; - if (resultFlags.HasFlag(MurderResultFlags.FailedError)) + if (resultFlags.HasFlag(MurderResultFlags.FailedError) || LobbyBehaviour.Instance) { return; } @@ -249,6 +253,10 @@ public static class CustomMurderRpc bool createDeadBody = true, bool teleportMurderer = true) { + if (LobbyBehaviour.Instance) + { + yield break; + } var cam = Camera.main?.GetComponent(); var isParticipant = source.AmOwner || target.AmOwner; var sourcePhys = source.MyPhysics; From 7f506000a42dd968f4b170e43b1c7e963e8c9aa3 Mon Sep 17 00:00:00 2001 From: Atony <75191600+AtonyGit@users.noreply.github.com> Date: Wed, 11 Feb 2026 11:40:55 -0600 Subject: [PATCH 2/2] Check for vanilla kills --- Directory.Build.props | 2 +- MiraAPI/Patches/PlayerControlPatches.cs | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index f53e715..4b87d91 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -8,7 +8,7 @@ true - 0.3.7 + 0.3.8 dev All Of Us, XtraCube, Angxl diff --git a/MiraAPI/Patches/PlayerControlPatches.cs b/MiraAPI/Patches/PlayerControlPatches.cs index 659c52f..946b6f2 100644 --- a/MiraAPI/Patches/PlayerControlPatches.cs +++ b/MiraAPI/Patches/PlayerControlPatches.cs @@ -117,6 +117,20 @@ internal static class PlayerControlPatches __instance.RpcMurderPlayer(target, true); } + [HarmonyPrefix] + [HarmonyPatch(nameof(PlayerControl.RpcMurderPlayer))] + [HarmonyPatch(nameof(PlayerControl.MurderPlayer))] + // ReSharper disable once InconsistentNaming + public static bool MurderPlayerPrefix(PlayerControl __instance) + { + if (LobbyBehaviour.Instance) + { + return false; + } + + return true; + } + [HarmonyPostfix] [HarmonyPatch(nameof(PlayerControl.FixedUpdate))] // ReSharper disable once InconsistentNaming