mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-21 18:40:03 +00:00
respawn fix
This commit is contained in:
parent
d2c8ba5d11
commit
804680ba0c
@ -57,17 +57,18 @@ namespace QSB.DeathSync
|
||||
|
||||
public void ResetShip()
|
||||
{
|
||||
if (_shipSpawnPoint == null)
|
||||
{
|
||||
DebugLog.ToConsole("_shipSpawnPoint is null!", MessageType.Warning);
|
||||
Init();
|
||||
}
|
||||
|
||||
if (_shipBody == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Reset ship position.
|
||||
if (_shipSpawnPoint == null)
|
||||
{
|
||||
DebugLog.ToConsole("_shipSpawnPoint is null!", MessageType.Warning);
|
||||
return;
|
||||
}
|
||||
_shipBody.SetVelocity(_shipSpawnPoint.GetPointVelocity());
|
||||
_shipBody.WarpToPositionRotation(_shipSpawnPoint.transform.position, _shipSpawnPoint.transform.rotation);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user