Private Member Functions | |
| void | ItemOptics () |
| proto native bool | EnterOptics () |
| switches to optics mode if possible | |
| proto native bool | IsInOptics () |
| is weapon in optics mode or not | |
| proto native bool | ExitOptics () |
| switches out of optics mode (if possible) | |
| proto native bool | HasWeaponIronsightsOverride () |
| is weapon in optics mode or not | |
| proto native bool | UseWeaponIronsightsOverride (bool state) |
| switches into ironsights override settings | |
| proto native bool | IsUsingWeaponIronsightsOverride () |
| is optics using ironsights override settings or not | |
| proto native int | GetStepFOVCount () |
| returns number of configured steps | |
| proto native int | GetStepFOVIndex () |
| returns index of currently used value in 'discretefov' config array | |
| proto native bool | SetStepFOVIndex (int step) |
| sets zoom to fov value defined at given in 'discretefov' config array | |
| proto native bool | StepFOVUp () |
| sets zoom to next defined (respective to current) value in zoom fov config array | |
| proto native bool | StepFOVDown () |
| sets zoom to previous (respective to current) defined value in zoom fov config array | |
| proto native float | GetCurrentStepFOV () |
| returns fov value at current index, or 'OpticsInfo.opticsZoomInit' config value (non-zooming optics) | |
| proto native int | GetStepZeroing () |
| returns position of currently used value in zeroing config array | |
| proto native bool | SetStepZeroing (int step) |
| proto native bool | StepZeroingUp () |
| sets zeroing to next defined (respective to current) value in zeroing config array | |
| proto native bool | StepZeroingDown () |
| sets zeroing to previous (respective to current) defined value in zeroing config array | |
| proto native void | GetCameraPoint (out vector pos, out vector dir) |
| gets camera position & direction in model space of optics entity | |
| proto native float | GetZoomInit () |
| gets FOV value, when entering optics | |
| proto native float | GetZoomMin () |
| gets FOV minimum | |
| proto native float | GetZoomMax () |
| gets FOV maximum | |
| proto native float | GetZeroingDistanceZoomMin () |
| Gets Zeroing distance at opticsZoomMin. | |
| proto native float | GetZeroingDistanceZoomMax () |
| Gets Zeroing distance at opticsZoomMax. | |
| proto native void | SetZeroingClampDist (float dist) |
| Sets zeroing clamp for the optics and updates the clamp if dist > 0. Used when attached to weapon. | |
| protected void | OnDrawOptics2D () |
| protected ItemOpticsType | GetItemOpticsType () |
Returns the ItemOpticsType of this ItemOptics instance. | |
| bool | IsUsingOptics2DModel () |
Returns whether this ItemOptics uses the 2D optics model. | |
| bool | IsSightOnly () |
| override void | OnWorkStart () |
| override void | OnWorkStop () |
| bool | IsWorking () |
| void | UpdateOpticsReddotVisibility () |
| override void | OnWasAttached (EntityAI parent, int slot_id) |
| override void | OnWasDetached (EntityAI parent, int slot_id) |
| override void | OnInventoryExit (Man player) |
| override void | OnStoreSave (ParamsWriteContext ctx) |
| override bool | OnStoreLoad (ParamsReadContext ctx, int version) |
| override void | OnVariablesSynchronized () |
| void | InitReddotData () |
| void | ShowReddot (bool state) |
| void | InitOpticsPPInfo () |
| bool | InitDOFAvailability () |
| optics with more than 1x zoom do not allow DOF changes | |
| void | InitOpticsPP (out array< float > mask_array, out array< float > lens_array, out float blur_float) |
| initializes values for optics' post-processes | |
| void | InitCameraOverrideProperties () |
| bool | InitOpticsDOFProperties (out array< float > temp_array) |
| Initializes DOF properties for optic's alternate ironsights (ACOG etc.) | |
| bool | AllowsDOF () |
| returns 'true' for non-magnifying optics | |
| bool | IsNVOptic () |
| int | GetCurrentNVType () |
| void | SetCurrentOpticMode (int mode) |
| int | GetCurrentOpticMode () |
| void | OnOpticModeChange () |
| optic-specific behaviour to be defined here (override) | |
| void | OnOpticEnter () |
| void | OnOpticExit () |
| ref array< float > | GetOpticsDOF () |
| ref array< float > | GetOpticsPPMask () |
| ref array< float > | GetOpticsPPLens () |
| float | GetOpticsPPBlur () |
| float | GetNearPlaneValue () |
| void | Init2DPreloadType () |
| void | InitOpticMode () |
| void | UpdateSelectionVisibility () |
| override void | SetActions () |
| override void | OnDebugSpawn () |
| override bool | CanPutAsAttachment (EntityAI parent) |
| void | HuntingOptic () |
| override void | OnWasAttached (EntityAI parent, int slot_id) |
| override void | OnWasDetached (EntityAI parent, int slot_id) |
| override void | HideSelection (string selection_name) |
| override void | ShowSelection (string selection_name) |
| bool | ParentUsesWinchesterTypeMount () |
| override bool | CanPutAsAttachment (EntityAI parent) |
| void | SetPlayer (PlayerBase player) |
| PlayerBase | GetPlayer () |
| void | StartWorkServer () |
| void | StopWorkServer () |
Private Attributes | |
| bool | m_data_set |
| bool | m_allowsDOF |
| bool m_reddot_displayed bool | m_isNVOptic = false |
| int | m_CurrentOpticMode |
| int | m_CurrentOpticModeLocal |
| int | m_reddot_index |
| float | m_blur_float |
| float | m_nearplane_override |
| string | m_optic_sight_texture |
| string | m_optic_sight_material |
| string | m_2D_preload_type |
| ref array< float > | m_mask_array |
| ref array< float > | m_lens_array |
| ref array< float > | m_OpticsDOFProperties |
| EntityAI | m_Parent |
| protected PlayerBase | m_Player |
| protected bool | m_IsActionActive |
|
inlineprivate |
|
inlineprivate |
returns 'true' for non-magnifying optics
References m_allowsDOF.
Referenced by Weapon::HideWeaponBarrel(), and SetCameraPP().
|
private |
switches to optics mode if possible
Referenced by ActionViewBinoculars::EnterOptics(), ActionViewOptics::EnterOptics(), ActionZoomIn::OnEndServer(), and DayZPlayer::SwitchOptics().
|
private |
switches out of optics mode (if possible)
Referenced by ActionViewOptics::ExitOptics(), ActionZoomOut::OnEndServer(), and DayZPlayer::SwitchOptics().
gets camera position & direction in model space of optics entity
Referenced by DayZPlayerCameraBase::GetCurrentSightInfo(), and GetCurrentSightInfo().
|
inlineprivate |
Referenced by SetCameraPP().
|
inlineprivate |
References m_CurrentOpticMode.
Referenced by ActionToggleNVMode::SwitchMode(), UpdateSelectionVisibility(), and StarlightOptic::UpdateSelectionVisibility().
|
private |
returns fov value at current index, or 'OpticsInfo.opticsZoomInit' config value (non-zooming optics)
Referenced by ManBase::HideClothing(), and HoldBreathFOVEffect().
|
inlineprivate |
Returns the ItemOpticsType of this ItemOptics instance.
Referenced by InitReddotData(), IsUsingOptics2DModel(), and OnDrawOptics2D().
|
inlineprivate |
References m_nearplane_override.
Referenced by AdjustCameraParameters().
References m_OpticsDOFProperties.
Referenced by DayZPlayerCameraBase::SetCameraPP(), and SetCameraPP().
|
inlineprivate |
References m_blur_float.
Referenced by SetCameraPP().
References m_lens_array.
Referenced by SetCameraPP().
References m_mask_array.
Referenced by SetCameraPP().
|
inlineprivate |
References m_Player.
|
private |
returns number of configured steps
|
private |
returns index of currently used value in 'discretefov' config array
|
private |
returns position of currently used value in zeroing config array
|
private |
Gets Zeroing distance at opticsZoomMax.
|
private |
Gets Zeroing distance at opticsZoomMin.
|
private |
gets FOV value, when entering optics
|
private |
gets FOV maximum
|
private |
gets FOV minimum
|
private |
is weapon in optics mode or not
Referenced by Weapon::CanEnterIronsights(), and DayZPlayerCameraBase::SetupSightEntities().
|
inlineprivate |
References HideSelection().
Referenced by ActionViewBinoculars::EnterOptics(), ActionViewOptics::EnterOptics(), HideSelection(), HuntingOptic(), OnOpticEnter(), OnOpticEnter(), StarlightOptic::OnOpticEnter(), OnWasAttached(), OnWasDetached(), ShowSelection(), UpdateSelectionVisibility(), and StarlightOptic::UpdateSelectionVisibility().
|
inlineprivate |
References HideSelection().
|
inlineprivate |
References CGame::ConfigGetText(), GetGame(), GetType(), m_2D_preload_type, and path.
Referenced by ItemOptics().
|
inlineprivate |
References DayZPlayerCameraOptics(), GetGame(), GetType(), m_nearplane_override, Math::Max(), and path.
Referenced by ItemOptics().
|
inlineprivate |
optics with more than 1x zoom do not allow DOF changes
References CGame::ConfigGetFloat(), GameConstants::DZPLAYER_CAMERA_FOV_IRONSIGHTS, GetGame(), GetType(), and path.
Referenced by InitOpticsPPInfo().
|
inlineprivate |
References GameConstants::OPTICS_STATE_DAY, and SetCurrentOpticMode().
Referenced by ItemOptics().
Initializes DOF properties for optic's alternate ironsights (ACOG etc.)
References CGame::ConfigGetFloatArray(), GetGame(), and GetType().
Referenced by ItemOptics().
|
inlineprivate |
initializes values for optics' post-processes
References CGame::ConfigGetFloat(), CGame::ConfigGetFloatArray(), GetGame(), GetType(), and path.
Referenced by InitOpticsPPInfo().
|
inlineprivate |
References InitDOFAvailability(), InitOpticsPP(), m_allowsDOF, m_blur_float, m_isNVOptic, m_lens_array, and m_mask_array.
Referenced by ItemOptics().
|
inlineprivate |
References CGame::ConfigGetText(), GetGame(), GetItemOpticsType(), GetType(), IsUsingOptics2DModel(), m_data_set, m_optic_sight_material, m_optic_sight_texture, m_reddot_index, and path.
Referenced by ItemOptics(), and ShowReddot().
|
private |
is weapon in optics mode or not
Referenced by ActionViewBinoculars::ActionCondition(), ActionViewOptics::ActionCondition(), ActionZoomIn::ActionCondition(), ActionZoomOut::ActionCondition(), DayZPlayer::HandleWeapons(), DayZPlayer::OnDrawOptics2D(), ActionViewOptics::OnEndClient(), ActionViewOptics::OnEndServer(), ActionViewOptics::OnStartAnimationLoopClient(), ActionViewOptics::OnStartAnimationLoopServer(), UpdateSelectionVisibility(), and StarlightOptic::UpdateSelectionVisibility().
|
inlineprivate |
References m_isNVOptic.
Referenced by ActionToggleNVMode::ActionCondition(), Init(), and SetCameraPP().
|
inlineprivate |
Referenced by DayZPlayer::SwitchOptics().
|
inlineprivate |
Returns whether this ItemOptics uses the 2D optics model.
References GetItemOpticsType().
Referenced by InitReddotData(), DayZPlayer::OnDrawOptics2D(), and ShowReddot().
|
private |
is optics using ironsights override settings or not
Referenced by DayZPlayer::HandleWeapons().
|
inlineprivate |
Referenced by GetCurrentNVType(), StarlightOptic::GetCurrentNVType(), Init(), and UpdateOpticsReddotVisibility().
|
inlineprivate |
|
inlineprivate |
References GetItemOpticsType(), m_optic_sight_material, m_optic_sight_texture, and m_reddot_index.
|
inlineprivate |
References SetTakeable().
|
inlineprivate |
References GetGame(), and HideSelection().
Referenced by DayZPlayer::SwitchOptics().
|
inlineprivate |
References GetGame(), and ShowSelection().
Referenced by DayZPlayer::SwitchOptics().
|
inlineprivate |
optic-specific behaviour to be defined here (override)
Referenced by OnStoreLoad(), OnVariablesSynchronized(), and SetCurrentOpticMode().
|
inlineprivate |
References m_CurrentOpticMode, m_IsStoreLoad, OnOpticModeChange(), and Serializer::Read().
|
inlineprivate |
References m_CurrentOpticMode, and Serializer::Write().
|
inlineprivate |
References m_CurrentOpticMode, m_CurrentOpticModeLocal, and OnOpticModeChange().
References Class::CastTo(), SetTakeable(), and SetZeroingClampDist().
References HideSelection(), m_Parent, ParentUsesWinchesterTypeMount(), and ShowSelection().
References Class::CastTo(), SetTakeable(), and SetZeroingClampDist().
References HideSelection(), m_Parent, and ShowSelection().
|
inlineprivate |
References GetGame(), and ShowReddot().
|
inlineprivate |
References GetGame(), and ShowReddot().
|
inlineprivate |
References m_Parent.
Referenced by OnWasAttached(), and ShowSelection().
|
inlineprivate |
References AddAction().
|
inlineprivate |
References m_CurrentOpticMode, and OnOpticModeChange().
Referenced by InitOpticMode(), StarlightOptic::InitOpticMode(), and ActionToggleNVMode::SwitchMode().
|
inlineprivate |
References m_Player.
|
private |
sets zoom to fov value defined at given in 'discretefov' config array
| [in] | index | of configured step, range [0..cfg_max] |
|
private |
Sets zeroing clamp for the optics and updates the clamp if dist > 0. Used when attached to weapon.
Referenced by OnWasAttached(), and OnWasDetached().
|
inlineprivate |
References ErrorEx, GetGame(), InitReddotData(), IsUsingOptics2DModel(), m_data_set, m_optic_sight_material, m_optic_sight_texture, and m_reddot_index.
Referenced by OnWorkStart(), OnWorkStop(), and UpdateOpticsReddotVisibility().
|
inlineprivate |
References HideSelection(), ParentUsesWinchesterTypeMount(), and ShowSelection().
Referenced by ActionViewBinoculars::ExitOptics(), ActionViewOptics::ExitOptics(), OnOpticExit(), OnWasAttached(), OnWasDetached(), ShowSelection(), UpdateSelectionVisibility(), and StarlightOptic::UpdateSelectionVisibility().
|
inlineprivate |
|
private |
sets zoom to previous (respective to current) defined value in zoom fov config array
|
private |
sets zoom to next defined (respective to current) value in zoom fov config array
|
private |
sets zeroing to previous (respective to current) defined value in zeroing config array
Referenced by DayZPlayer::HandleWeapons().
|
private |
sets zeroing to next defined (respective to current) value in zeroing config array
Referenced by DayZPlayer::HandleWeapons().
|
inlineprivate |
|
inlineprivate |
References IsWorking(), and ShowReddot().
Referenced by DayZPlayerCameraBase::UpdateBatteryOptics().
|
inlineprivate |
Referenced by OnOpticModeChange().
|
private |
switches into ironsights override settings
Referenced by DayZPlayerCameraBase::GetCurrentSightInfo(), and GetCurrentSightInfo().
|
private |
Referenced by Init2DPreloadType().
|
private |
Referenced by AllowsDOF(), and InitOpticsPPInfo().
|
private |
Referenced by GetOpticsPPBlur(), and InitOpticsPPInfo().
|
private |
|
private |
Referenced by ItemOptics(), and OnVariablesSynchronized().
|
private |
Referenced by InitReddotData(), and ShowReddot().
|
private |
Referenced by InitOpticsPPInfo(), and IsNVOptic().
Referenced by GetOpticsPPLens(), InitOpticsPPInfo(), and ItemOptics().
Referenced by GetOpticsPPMask(), InitOpticsPPInfo(), and ItemOptics().
|
private |
Referenced by GetNearPlaneValue(), and InitCameraOverrideProperties().
|
private |
Referenced by InitReddotData(), OnDrawOptics2D(), and ShowReddot().
|
private |
Referenced by InitReddotData(), OnDrawOptics2D(), and ShowReddot().
Referenced by GetOpticsDOF(), and ItemOptics().
|
private |
|
private |
|
private |
Referenced by InitReddotData(), OnDrawOptics2D(), and ShowReddot().