class ItemOpticsSource
ItemOptics › InventoryItemSuper
View all 33 descendants
- ACOGOptic
- ACOGOptic_6x
- AugOptic
- Binoculars
- BUISOptic
- FNP45_MRDSOptic
- GrozaOptic
- HoloOptic
- HuntingOptic
- KashtanOptic
- KazuarOptic
- KobraOptic
- LongrangeOptic
- M4_CarryHandleOptic
- M4_T3NRDSOptic
- M68Optic
- M79DummyOptics
- MK4Optic_ColorBase
- PistolOptic
- PoweredOptic_Base
- PSO11Optic
- PSO1Optic
- PSO6Optic
- PUScopeOptic
- ReflexOptic
- SportingOptic
- SSG82Optic
- StarlightOptic
Constructors 1
void ItemOptics()Members 15
bool m_data_setbool m_allowsDOFtrue if optics DOES NOT have magnification (FOV >= DZPLAYER_CAMERA_FOV_IRONSIGHTS)
bool m_reddot_displayedbool m_isNVOptic = falseint m_CurrentOpticModegeneric optic mode, currently used for NV optics only (could be expanded)
int m_CurrentOpticModeLocallocal mirror for sync purposes;
int m_reddot_indexfloat m_blur_floatfloat m_nearplane_overrideoverride value for DayZPlayerCameraOptics only!
string m_optic_sight_texturestring m_optic_sight_materialstring m_2D_preload_typeMethods 63
proto native bool EnterOptics()switches to optics mode if possible
Returns: true if success, false otherwise
Show 1 more
, DayZPlayerImplement.SwitchOptics()proto native bool IsInOptics()is weapon in optics mode or not
Returns: true if in optics mode, false otherwise
Show 10 more
, ActionViewOptics.OnEndClient(), ActionViewOptics.OnEndServer(), ActionViewOptics.OnStartAnimationLoopClient(), ActionViewOptics.OnStartAnimationLoopServer(), ActionZoomIn.ActionCondition(), ActionZoomOut.ActionCondition(), DayZPlayerImplement.HandleWeapons(), DayZPlayerImplement.OnDrawOptics2D(), KazuarOptic.UpdateSelectionVisibility(), and StarlightOptic.UpdateSelectionVisibility()proto native bool ExitOptics()switches out of optics mode (if possible)
Returns: true if success, false otherwise
proto native bool HasWeaponIronsightsOverride()is weapon in optics mode or not
Returns: true if optics has defined override optics info for weapon
switches into ironsights override settings
Returns: true if switching was successful
proto native bool IsUsingWeaponIronsightsOverride()is optics using ironsights override settings or not
Returns: true if optics is using ironsights override settings
proto native int GetStepFOVCount()returns number of configured steps
proto native int GetStepFOVIndex()returns index of currently used value in 'discretefov' config array
Returns: index of currently used value in 'discretefov' config array
sets zoom to fov value defined at given in 'discretefov' config array
- in
index - of configured step, range [0..cfg_max]
Returns: true if zoom set
proto native bool StepFOVUp()sets zoom to next defined (respective to current) value in zoom fov config array
Returns: true if zoom set
proto native bool StepFOVDown()sets zoom to previous (respective to current) defined value in zoom fov config array
Returns: true if zoom set
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
Returns: position of currently used value in zeroing config array
sets zeroing to value defined at given position in zeroing config array
- in
index - of zeroing to set [0..cfg_max]
Returns: true if zeroing set
proto native bool StepZeroingUp()sets zeroing to next defined (respective to current) value in zeroing config array
Returns: true if zeroing set
proto native bool StepZeroingDown()sets zeroing to previous (respective to current) defined value in zeroing config array
Returns: true if zeroing set
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()Callback raised before 2D optics are drawn. (Only for optics where ItemOpticsType::IsUsingOptics2DModel)
protected ItemOpticsType GetItemOpticsType()Returns the `ItemOpticsType` of this `ItemOptics` instance.
bool IsUsingOptics2DModel()Returns whether this `ItemOptics` uses the 2D optics model.
Show 1 more
, NVGoggles.GetCurrentNVType()bool IsSightOnly()bool IsUsableWithNV()override void OnWorkStart()override void OnWorkStop()bool IsWorking()Show 2 more
, NVGoggles.GetCurrentNVType(), and StarlightOptic.GetCurrentNVType()void UpdateOpticsReddotVisibility()Show 3 more
, ItemBase.OnWasAttached(), ItemBase.SetTakeable(), and SetZeroingClampDist()override void OnInventoryExit(Man player)Show 1 more
, ItemBase.SetTakeable()override void OnStoreSave(ParamsWriteContext ctx)override bool OnStoreLoad(ParamsReadContext ctx, int version)Show 3 more
, EntityAI.SetSynchDirty(), m_CurrentOpticMode, and ItemBase.m_IsStoreLoadoverride void OnVariablesSynchronized()Show 1 more
, m_CurrentOpticModeLocalvoid InitReddotData()void ShowReddot(bool state)void InitOpticsPPInfo()Show 5 more
, m_allowsDOF, m_blur_float, m_isNVOptic, m_lens_array, and m_mask_arraybool InitDOFAvailability()optics with more than 1x zoom do not allow DOF changes
initializes values for optics' post-processes
void InitCameraOverrideProperties()Initializes DOF properties for optic's alternate ironsights (ACOG etc.)
bool IsNVOptic()int GetCurrentNVType()void SetCurrentOpticMode(int mode)Show 1 more
, StarlightOptic.InitOpticMode()int GetCurrentOpticMode()void OnOpticModeChange()optic-specific behaviour to be defined here (override)
Show 2 more
, KazuarOptic.OnOpticModeChange(), and StarlightOptic.OnOpticModeChange()void OnOpticEnter()void OnOpticExit()float GetNearPlaneValue()void Init2DPreloadType()Show 1 more
, m_2D_preload_typevoid InitOpticMode()void UpdateSelectionVisibility()override void SetActions()Show 2 more
, Rangefinder.SetActions(), and StarlightOptic.SetActions()override void OnDebugSpawn()