mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-06 10:09:31 +00:00
check for ship ownership when killing player / vanishing ship
This commit is contained in:
parent
70d80e6e19
commit
00e814920e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user