mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-06 10:09:31 +00:00
added for player as well
This commit is contained in:
parent
804680ba0c
commit
4501b2511f
@ -59,7 +59,7 @@ namespace QSB.DeathSync
|
||||
{
|
||||
if (_shipSpawnPoint == null)
|
||||
{
|
||||
DebugLog.ToConsole("_shipSpawnPoint is null!", MessageType.Warning);
|
||||
DebugLog.ToConsole("Warning - _shipSpawnPoint is null!", MessageType.Warning);
|
||||
Init();
|
||||
}
|
||||
|
||||
@ -95,6 +95,12 @@ namespace QSB.DeathSync
|
||||
|
||||
public void ResetPlayer()
|
||||
{
|
||||
if (_shipSpawnPoint == null)
|
||||
{
|
||||
DebugLog.ToConsole("Warning - _playerSpawnPoint is null!", MessageType.Warning);
|
||||
Init();
|
||||
}
|
||||
|
||||
// Reset player position.
|
||||
var playerBody = Locator.GetPlayerBody();
|
||||
playerBody.WarpToPositionRotation(_playerSpawnPoint.transform.position, _playerSpawnPoint.transform.rotation);
|
||||
|
@ -180,8 +180,6 @@ namespace QSB
|
||||
gameObject.AddComponent<RespawnOnDeath>();
|
||||
gameObject.AddComponent<PreventShipDestruction>();
|
||||
|
||||
QSBCore.Helper.Events.Unity.RunWhen(() => QSBCore.HasWokenUp, RespawnOnDeath.Instance.Init);
|
||||
|
||||
if (QSBSceneManager.IsInUniverse)
|
||||
{
|
||||
QSBSectorManager.Instance.RebuildSectors();
|
||||
|
Loading…
Reference in New Issue
Block a user