From 5294f0a97912b2a6d48c349678541e1e1552a52a Mon Sep 17 00:00:00 2001 From: GrafDimenzio Date: Mon, 20 Jul 2020 08:18:37 +0200 Subject: [PATCH] update to ptb 23 --- Synapse/Events/Patches/DoorInteractPatch.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Synapse/Events/Patches/DoorInteractPatch.cs b/Synapse/Events/Patches/DoorInteractPatch.cs index d408c13..9cf892f 100644 --- a/Synapse/Events/Patches/DoorInteractPatch.cs +++ b/Synapse/Events/Patches/DoorInteractPatch.cs @@ -18,9 +18,9 @@ public static bool Prefix(PlayerInteract __instance, GameObject doorId) if (!__instance._playerInteractRateLimit.CanExecute() || (__instance._hc.CufferId > 0 && !PlayerInteract.CanDisarmedInteract) || doorId == null || __instance._ccm.CurClass == RoleType.None || __instance._ccm.CurClass == RoleType.Spectator || - !doorId.TryGetComponent(out door) || !((door.buttons.Count == 0) + !doorId.TryGetComponent(out door) || !((door.Buttons.Count == 0) ? __instance.ChckDis(doorId.transform.position) - : door.buttons.Any(item => __instance.ChckDis(item.transform.position)))) return false; + : door.Buttons.Any(item => __instance.ChckDis(item.button.transform.position)))) return false; __instance.OnInteract();