allow detach even if not grounded

This commit is contained in:
JohnCorby 2022-02-07 20:48:17 -08:00
parent 1088539b37
commit 9d0bc4fd64

View File

@ -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();
}
}
}
}