mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-17 01:13:05 +00:00
allow detach even if not grounded
This commit is contained in:
parent
1088539b37
commit
9d0bc4fd64
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user