@@ -78,10 +78,11 @@ 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 )
85+ SpecializationUtil .registerOverwrittenFunction (vehicleType , ' actionEventCameraZoomInOut' , CpHud .actionEventCameraZoomInOut )
8586end
8687
8788--- Disables the click to switch action, while the mouse is over the cp hud.
@@ -104,7 +105,7 @@ function CpHud:onRegisterActionEvents(isActiveForInput, isActiveForInputIgnoreSe
104105 if self .isClient then
105106 local spec = self .spec_cpHud
106107 self :clearActionEventsTable (spec .actionEvents )
107- if self .isActiveForInputIgnoreSelectionIgnoreAI then
108+ if self .isActiveForInputIgnoreSelectionIgnoreAI and self . propertyState ~= VehiclePropertyState . SHOP_CONFIG then
108109 --- Toggle mouse cursor action event
109110 --- Parameters:
110111 --- (actionEventsTable, inputAction, target,
@@ -312,6 +313,14 @@ function CpHud:onLeaveVehicle(wasEntered)
312313 end
313314end
314315
316+ ---- Disables zoom, while mouse is over the cp hud.
317+ function CpHud :actionEventCameraZoomInOut (self , superFunc , ...)
318+ if self :getIsMouseOverCpHud () then
319+ return
320+ end
321+ return superFunc (self , ... )
322+ end
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