From c828ad601f2f30373d89a61036a9ce35505996f9 Mon Sep 17 00:00:00 2001 From: BoroBongo Date: Sun, 22 Nov 2026 18:49:20 +0000 Subject: [PATCH] fix: a lock pick at a key-only lock no longer throws on every turn of the hand - the hero says he needs the key, the key in the inventory opens it Gothic's locks have a key and/or a pick combination (world file). A lock without combination (key only, never opens) took the pick anyway; UpdateCombination read the first char of the empty combination on every 45 degree turn. Now the pick works like an empty hand there: the key in the inventory opens the lock, else the hero says $KEYMISSING / $NEVEROPEN. --- .../LockPicking/VRContainerDoorPickingInteraction.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Assets/Gothic-VR/Scripts/Adapters/Vob/LockPicking/VRContainerDoorPickingInteraction.cs b/Assets/Gothic-VR/Scripts/Adapters/Vob/LockPicking/VRContainerDoorPickingInteraction.cs index 3da3ad147..e6a4b6399 100644 --- a/Assets/Gothic-VR/Scripts/Adapters/Vob/LockPicking/VRContainerDoorPickingInteraction.cs +++ b/Assets/Gothic-VR/Scripts/Adapters/Vob/LockPicking/VRContainerDoorPickingInteraction.cs @@ -154,6 +154,16 @@ private void OnTriggerEnter(Collider other) return; } + // A lock without combination (key only, or never opens) can't be picked: like an empty hand, the key in + // the inventory opens it, else the hero says why ($KEYMISSING). Picking threw on every turn of the hand. + if (string.IsNullOrEmpty(_combination)) + { + Logger.Log($"[Lock] Lock pick at '{_lockable.Vob.Name}', which has no combination (key: " + + $"'{_keyInstance}') - can't be picked.", LogCat.VR); + OnEmptyHandTouched(_handSide); + return; + } + // The hand turns, not the pick's world angle. var isHandRollTracked = false; var handVisual = _vrPlayerService.VRContextInteractionService?.Rig?.GetHandVisual(_handSide);