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] 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