Skip to content
This repository was archived by the owner on Jul 18, 2022. It is now read-only.

Commit d79ba4a

Browse files
committed
patch: Only allow interactions if enabled
1 parent 0bcc02b commit d79ba4a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Assets/TinkerStorm.Checkpoints/Scripts/Respawnable.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ private void Start()
1414

1515
public void Respawn()
1616
{
17+
if (!enabled) return;
18+
1719
transform.position = respawnPosition;
1820
transform.rotation = respawnRotation;
1921
}
@@ -25,6 +27,8 @@ public void SetRespawnAt(Transform transform)
2527

2628
public void SetRespawnAt(Vector3 position, Quaternion rotation)
2729
{
30+
if (!enabled) return;
31+
2832
respawnPosition = position;
2933
respawnRotation = rotation;
3034
}

0 commit comments

Comments
 (0)