diff --git a/mod/Cyberware.esm b/mod/Cyberware.esm index 6d575b7..bccb2e9 100644 Binary files a/mod/Cyberware.esm and b/mod/Cyberware.esm differ diff --git a/src/CWxBionicEyesOnHotkey.gek b/src/CWxBionicEyesOnHotkey.gek index e64e034..9c85fa9 100644 --- a/src/CWxBionicEyesOnHotkey.gek +++ b/src/CWxBionicEyesOnHotkey.gek @@ -8,11 +8,22 @@ begin function { iKeyID } return endif - if iKeyID != CWxVisionModeHotkey - SetOnKeyUpEventHandler CWxBionicEyesOnHotkey 0 iKeyID + if iKeyID == 27 + if GetController + if GetCrosshairRef != 0 + return + endif + if playerRef.IsSneaking && playerRef.HasPerk CWxImplantStealthPerk + return + endif + elseif iKeyID != CWxVisionModeHotkey + return + endif + elseif iKeyID != CWxVisionModeHotkey + SetOnKeyUpEventHandler (GetCurrentScript) 0 iKeyID return endif - + if CWxVisionModeLevel == 0 SetStage CWxBionicEyesQuest 1 diff --git a/src/CWxBionicEyesUpdateTriggers.gek b/src/CWxBionicEyesUpdateTriggers.gek index 9d06456..dd993d2 100644 --- a/src/CWxBionicEyesUpdateTriggers.gek +++ b/src/CWxBionicEyesUpdateTriggers.gek @@ -7,6 +7,7 @@ begin function { iMode } if player.HasPerk CWxImplantVisionModePerk SetOnKeyUpEventHandler CWxBionicEyesOnHotkey 1 CWxVisionModeHotkey + SetOnControlDownEventHandler CWxBionicEyesOnHotkey 1 27 ; Grab ; Clear list of processed actors to reapply shaders if CWxVisionModeLevel > 0 @@ -16,6 +17,7 @@ begin function { iMode } else SetOnKeyUpEventHandler CWxBionicEyesOnHotkey 0 CWxVisionModeHotkey + SetOnControlDownEventHandler CWxBionicEyesOnHotkey 0 27 ; Grab endif end diff --git a/src/CWxStealthOnHotkey.gek b/src/CWxStealthOnHotkey.gek index 3aa4d54..fcbfa4b 100644 --- a/src/CWxStealthOnHotkey.gek +++ b/src/CWxStealthOnHotkey.gek @@ -1,7 +1,6 @@ scn CWxStealthOnHotkey int iKeyID -ref rScript begin function { iKeyID } @@ -9,13 +8,23 @@ begin function { iKeyID } return endif - if iKeyID != CWxStealthFieldHotkey + if iKeyID == 27 + if GetController + if GetCrosshairRef != 0 + return + endif + if playerRef.IsSneaking == 0 + return + endif + elseif iKeyID != CWxStealthFieldHotkey + return + endif + elseif iKeyID != CWxStealthFieldHotkey printd "Cyberware: Autoremoved stealth hotkey" - set rScript to GetCurrentScript - SetOnKeyUpEventHandler rScript 0 iKeyID + SetOnKeyUpEventHandler (GetCurrentScript) 0 iKeyID return endif - + if player.IsSpellTargetAlt CWxStealthField printd "Cyberware: Swithing stealth off" SetStage CWxStealthFieldQuest 0 diff --git a/src/CWxStealthUpdateTriggers.gek b/src/CWxStealthUpdateTriggers.gek index 4196781..0b08c43 100644 --- a/src/CWxStealthUpdateTriggers.gek +++ b/src/CWxStealthUpdateTriggers.gek @@ -9,6 +9,7 @@ begin function { iStatus } SetOnKeyUpEventHandler CWxStealthOnHotkey bEnabled CWxStealthFieldHotkey SetOnUseAidItemEventHandler CWxStealthOnUseSB bEnabled StealthBoy + SetOnControlDownEventHandler CWxStealthOnHotkey bEnabled 27 ; Grab if GetUIFloat "HUDMainMenu\_CWxSFMeterEnabled" if player.IsSpellTargetAlt CWxStealthField == 0