@@ -78,10 +78,10 @@ function CpHud.registerFunctions(vehicleType)
7878end
7979
8080function CpHud .registerOverwrittenFunctions (vehicleType )
81- if vehicleType .functions [" enterVehicleRaycastClickToSwitch" ] ~= nil then
81+ if vehicleType .functions [" enterVehicleRaycastClickToSwitch" ] ~= nil then
8282 SpecializationUtil .registerOverwrittenFunction (vehicleType , " enterVehicleRaycastClickToSwitch" , CpHud .enterVehicleRaycastClickToSwitch )
83- end
84- SpecializationUtil .registerOverwrittenFunction (vehicleType , ' getCpStartText' , CpHud .getCpStartText )
83+ end
84+ SpecializationUtil .registerOverwrittenFunction (vehicleType , ' getCpStartText' , CpHud .getCpStartText )
8585end
8686
8787--- Disables the click to switch action, while the mouse is over the cp hud.
@@ -104,7 +104,7 @@ function CpHud:onRegisterActionEvents(isActiveForInput, isActiveForInputIgnoreSe
104104 if self .isClient then
105105 local spec = self .spec_cpHud
106106 self :clearActionEventsTable (spec .actionEvents )
107- if self .isActiveForInputIgnoreSelectionIgnoreAI then
107+ if self .isActiveForInputIgnoreSelectionIgnoreAI and self . propertyState ~= VehiclePropertyState . SHOP_CONFIG then
108108 --- Toggle mouse cursor action event
109109 --- Parameters:
110110 --- (actionEventsTable, inputAction, target,
@@ -312,6 +312,15 @@ function CpHud:onLeaveVehicle(wasEntered)
312312 end
313313end
314314
315+ ---- Disables zoom, while mouse is over the cp hud.
316+ local function actionEventCameraZoomInOut (self , superFunc , ...)
317+ if self .getIsMouseOverCpHud and self :getIsMouseOverCpHud () then
318+ return
319+ end
320+ return superFunc (self , ... )
321+ end
322+ Enterable .actionEventCameraZoomInOut = Utils .overwrittenFunction (Enterable .actionEventCameraZoomInOut , actionEventCameraZoomInOut )
323+
315324function CpHud :onStateChange (state , data )
316325 local spec = self .spec_cpHud
317326 if state == VehicleStateChange .ATTACH or state == VehicleStateChange .DETACH then
0 commit comments