5 protected float m_fBinocFOV;
7 protected SCR_BinocularsComponent m_binoculars;
9 protected IEntity m_ePlayer;
18 override void OnActivate(ScriptedCameraItem pPrevCamera, ScriptedCameraItemResult pPrevCameraResult)
20 super.OnActivate(pPrevCamera, pPrevCameraResult);
26 m_Optics = FindOpticsComponent(m_ePlayer);
30 Print(
"Optics wasn't found in binoculars!", LogLevel.WARNING);
35 m_fBinocFOV = m_Optics.GetFovZoomed();
50 SCR_BinocularsComponent binoculars = SCR_BinocularsComponent.Cast(gadgetManager.GetHeldGadgetComponent());
54 IEntity entityBinocular = binoculars.GetOwner();
65 override void OnUpdate(
float pDt, out ScriptedCameraItemResult pOutResult)
67 super.OnUpdate(pDt, pOutResult);
69 pOutResult.m_fFOV = m_fBinocFOV;
70 pOutResult.m_bBlendFOV =
false;
72 if (m_pCompartmentAccess.IsInCompartment())
73 pOutResult.m_fUseHeading = 0;
77 pOutResult.m_fNearPlane = m_Optics.GetNearPlane();
80 pOutResult.m_fNearPlane = 0.05;