diff --git a/QSB/TimeSync/TimeSyncUI.cs b/QSB/TimeSync/TimeSyncUI.cs index d57833e4..60bce5e8 100644 --- a/QSB/TimeSync/TimeSyncUI.cs +++ b/QSB/TimeSync/TimeSyncUI.cs @@ -70,6 +70,15 @@ internal class TimeSyncUI : MonoBehaviour, IAddComponentOnStart enabled = true; _canvas.enabled = true; Canvas.willRenderCanvases += OnWillRenderCanvases; + + // silly hack that shouldnt be in the ui component but oh well + Locator.GetPlayerTransform().GetComponent()._invincible = true; + Locator.GetDeathManager()._invincible = true; + var shipTransform = Locator.GetShipTransform(); + if (shipTransform) + { + shipTransform.GetComponentInChildren()._invincible = true; + } } private void EndTimeSync() @@ -78,6 +87,15 @@ internal class TimeSyncUI : MonoBehaviour, IAddComponentOnStart enabled = false; _canvas.enabled = false; Canvas.willRenderCanvases -= OnWillRenderCanvases; + + // silly hack that shouldnt be in the ui component but oh well + Locator.GetPlayerTransform().GetComponent()._invincible = false; + Locator.GetDeathManager()._invincible = false; + var shipTransform = Locator.GetShipTransform(); + if (shipTransform) + { + shipTransform.GetComponentInChildren()._invincible = false; + } } private void OnWillRenderCanvases() @@ -133,4 +151,4 @@ internal class TimeSyncUI : MonoBehaviour, IAddComponentOnStart _text.text = text; } -} \ No newline at end of file +}