mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-18 13:23:05 +00:00
fix hatch close noise playing when walking under ship
This commit is contained in:
parent
22da72355d
commit
dad8c884a0
@ -45,10 +45,10 @@ namespace QSB.ShipSync.Patches
|
||||
|
||||
public static bool ShipTractorBeamSwitch_OnTriggerExit(Collider hitCollider, bool ____isPlayerInShip, bool ____functional)
|
||||
{
|
||||
if (!____isPlayerInShip && ____functional && hitCollider.CompareTag("PlayerDetector"))
|
||||
var shipTransform = Locator.GetShipTransform();
|
||||
var hatchController = shipTransform.GetComponentInChildren<HatchController>();
|
||||
if (!____isPlayerInShip && ____functional && hitCollider.CompareTag("PlayerDetector") && !hatchController.GetValue<GameObject>("_hatchObject").activeSelf)
|
||||
{
|
||||
var shipTransform = Locator.GetShipTransform();
|
||||
var hatchController = shipTransform.GetComponentInChildren<HatchController>();
|
||||
hatchController.Invoke("CloseHatch");
|
||||
QSBEventManager.FireEvent(EventNames.QSBHatchState, false);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user