From 9d0bc4fd647d9fd523c313fe164e19c0dc533fc8 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Mon, 7 Feb 2022 20:48:17 -0800 Subject: [PATCH] allow detach even if not grounded --- QSB/ShipSync/ShipCustomAttach.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/QSB/ShipSync/ShipCustomAttach.cs b/QSB/ShipSync/ShipCustomAttach.cs index 2a51028c..54020be3 100644 --- a/QSB/ShipSync/ShipCustomAttach.cs +++ b/QSB/ShipSync/ShipCustomAttach.cs @@ -40,6 +40,13 @@ namespace QSB.ShipSync } var attachedToUs = PlayerAttachWatcher.Current == _playerAttachPoint; + _detachPrompt.SetVisibility(attachedToUs); + if (attachedToUs && OWInput.IsNewlyPressed(InputLibrary.cancel, InputMode.Character)) + { + _playerAttachPoint.DetachPlayer(); + ShipManager.Instance.CockpitController._shipAudioController.PlayUnbuckle(); + } + if (!attachedToUs) { if (_playerAttachPoint.enabled) @@ -60,8 +67,6 @@ namespace QSB.ShipSync } _attachPrompt.SetVisibility(!attachedToUs); - _detachPrompt.SetVisibility(attachedToUs); - if (!attachedToUs && OWInput.IsPressed(InputLibrary.interactSecondary, InputMode.Character) && OWInput.IsNewlyPressed(InputLibrary.interact, InputMode.Character)) @@ -70,11 +75,6 @@ namespace QSB.ShipSync _playerAttachPoint.AttachPlayer(); ShipManager.Instance.CockpitController._shipAudioController.PlayBuckle(); } - else if (attachedToUs && OWInput.IsNewlyPressed(InputLibrary.cancel, InputMode.Character)) - { - _playerAttachPoint.DetachPlayer(); - ShipManager.Instance.CockpitController._shipAudioController.PlayUnbuckle(); - } } } }