mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
3 files changed
+24
-2
No files matched your search
@@ -8,7 +8,7 @@
|
||||
|
||||
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
|
||||
|
||||
<VersionPrefix>0.3.7</VersionPrefix>
|
||||
<VersionPrefix>0.3.8</VersionPrefix>
|
||||
<VersionSuffix>dev</VersionSuffix>
|
||||
|
||||
<Authors>All Of Us, XtraCube, Angxl</Authors>
|
||||
|
||||
@@ -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<FollowerCamera>();
|
||||
var isParticipant = source.AmOwner || target.AmOwner;
|
||||
var sourcePhys = source.MyPhysics;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user