From 00e814920edfabd22a02b24aa06d9bbcc4921ea9 Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Tue, 15 Jun 2021 18:55:54 +0100 Subject: [PATCH] check for ship ownership when killing player / vanishing ship --- QSB/DeathSync/Patches/DeathPatches.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/QSB/DeathSync/Patches/DeathPatches.cs b/QSB/DeathSync/Patches/DeathPatches.cs index 7b4d3c63..e7ff15fa 100644 --- a/QSB/DeathSync/Patches/DeathPatches.cs +++ b/QSB/DeathSync/Patches/DeathPatches.cs @@ -1,6 +1,7 @@ using Harmony; using QSB.Events; using QSB.Patches; +using QSB.ShipSync; using QSB.Utility; using System.Collections.Generic; using System.Linq; @@ -192,6 +193,12 @@ namespace QSB.DeathSync.Patches return true; } + if (!ShipManager.Instance.HasAuthority) + { + RespawnOnDeath.Instance.ResetPlayer(); + return false; + } + RespawnOnDeath.Instance.ResetShip(); RespawnOnDeath.Instance.ResetPlayer(); return false; @@ -219,6 +226,11 @@ namespace QSB.DeathSync.Patches return true; } + if (!ShipManager.Instance.HasAuthority) + { + return false; + } + if (PlayerState.IsInsideShip() || PlayerState.UsingShipComputer() || PlayerState.AtFlightConsole()) { Locator.GetDeathManager().KillPlayer(____deathType);