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