Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
dayzplayercameraironsights.c
Go to the documentation of this file.
1 
3 class DayZPlayerCameraIronsights extends DayZPlayerCameraBase
4 {
5  static const float CONST_UD_MIN = -85.0;
6  static const float CONST_UD_MAX = 85.0;
7  static const float CONST_UD_MIN_BACK = -25.0;
8 
9  static const float CONST_LR_MIN = -160.0;
10  static const float CONST_LR_MAX = 160.0;
11 
12  protected bool m_isEntering = false;
13  protected bool m_opticsHasWeaponOverride = false;
14  protected ref array<float> temp_array; //DOF only
15 
16  protected PPERequester_CameraADS m_RequesterADS;
17 
19  float m_velocityYaw[1];
20  float m_velocityPitch[1];
21  float m_dynamicsStrength;
22  float m_dynamicsSmoothTime;
23  vector m_SightMisalignmentModifier;
24 
25  float m_movementTimeAcc;
26  float m_movementAmplitudeX;
27  float m_movementAmplitudeY;
28  float m_movementFrequencyX;
29  float m_movementFrequencyY;
30 
31 
32  void DayZPlayerCameraIronsights(DayZPlayer pPlayer, HumanInputController pInput)
33  {
34  if (!temp_array)
35  temp_array = new array<float>;
36  m_iBoneIndex = pPlayer.GetBoneIndexByName("RightHand_Dummy");
37 
38  if (m_iBoneIndex == -1)
39  {
40  Print("DayZPlayerCamera1stPerson: main bone not found");
41  }
42 
43  m_dynamicsStrength = 2;
44  m_dynamicsSmoothTime = 0.3;
45 
46  SetupSightEntities();
47  GetCurrentSightInfo(m_OpticsCamPos, m_OpticsCamDir);
48  m_isEntering = true;
50 
51  m_movementTimeAcc = 0;
52  m_movementAmplitudeX = 1;
53  m_movementAmplitudeY = 1;
54  m_movementFrequencyX = 1;
55  m_movementFrequencyY = 2;
56 
57  Class.CastTo(m_RequesterADS,PPERequester_CameraADS.Cast(PPERequesterBank.GetRequester(PPERequester_CameraADS)));
58 
59  Init();
60  }
61 
62  void SetupSightEntities()
63  {
64  EntityAI inHands = m_pPlayer.GetHumanInventory().GetEntityInHands();
65  if (inHands)
66  {
67  m_weaponUsed = Weapon_Base.Cast(inHands);
68  if( m_weaponUsed )
69  {
70  m_SightMisalignmentModifier = m_weaponUsed.GetPropertyModifierObject().m_SightMisalignment;
71  m_dynamicsStrength = m_dynamicsStrength * m_SightMisalignmentModifier[0];
72  m_dynamicsSmoothTime = m_dynamicsSmoothTime * m_SightMisalignmentModifier[1];
73  m_opticsUsed = m_weaponUsed.GetAttachedOptics();
74  if( m_opticsUsed )
75  {
76  m_opticsHasWeaponOverride = m_opticsUsed.HasWeaponIronsightsOverride();
77  }
78  }
79  else
80  {
81  m_opticsUsed = ItemOptics.Cast(inHands);
82  }
83  }
84  }
85 
86  //
87  override void OnActivate (DayZPlayerCamera pPrevCamera, DayZPlayerCameraResult pPrevCameraResult)
88  {
89  super.OnActivate(pPrevCamera, pPrevCameraResult);
90 
91  if (pPrevCamera)
92  {
93  vector baseAngles = pPrevCamera.GetBaseAngles();
94  m_fUpDownAngle = baseAngles[0];
95  m_fLeftRightAngle = baseAngles[1];
96 
97  vector addAngles = pPrevCamera.GetAdditiveAngles();
98  m_fUpDownAngleAdd = addAngles[0];
99  m_fLeftRightAngleAdd = addAngles[1];
100  }
101  }
102 
104  {
105  if (m_opticsHasWeaponOverride)
106  return m_opticsUsed;
107 
108  return m_weaponUsed;
109  }
110 
111  bool GetCurrentSightInfo (out vector camPos, out vector camDir)
112  {
114  if (e)
115  {
116  if (e == m_weaponUsed)
117  {
118  m_weaponUsed.GetCameraPoint(m_weaponUsed.GetCurrentMuzzle(), camPos, camDir);
119  return true;
120  }
121  else if (e == m_opticsUsed)
122  {
123  m_opticsUsed.UseWeaponIronsightsOverride(m_opticsHasWeaponOverride);
124  m_opticsUsed.GetCameraPoint(camPos, camDir);
125  return true;
126  }
127  }
128  else
129  {
130  ErrorEx("No sight entity found in " + this,ErrorExSeverity.INFO);
131  }
132  return false;
133  }
134 
135  //
136  override void OnUpdate(float pDt, out DayZPlayerCameraResult pOutResult)
137  {
139  float min;
141  if (player && player.IsPlayerInStance(DayZPlayerConstants.STANCEMASK_RAISEDPRONE))
142  min = CONST_UD_MIN_BACK;
143  else
144  min = CONST_UD_MIN;
145 
148 
149  // get model space transform matrix of the gun's eye vector
150  vector matTM[4];
151  HumanItemAccessor hia = m_pPlayer.GetItemAccessor();
153  hia.WeaponGetCameraPointBoneRelative(GetCurrentSightEntity(), m_OpticsCamPos, m_OpticsCamDir, m_iBoneIndex, matTM);
154 
155  // aim change based on character movement
156  vector aimChangeYPR;
157  float aimChangeX = m_pInput.GetAimDelta(pDt)[0] * Math.RAD2DEG;
158  float aimChangeY = m_pInput.GetAimDelta(pDt)[1] * Math.RAD2DEG;
159 
160  HumanCommandMove hcm = m_pPlayer.GetCommand_Move();
161  if (hcm)
162  {
163  float speed = hcm.GetCurrentMovementSpeed();
164 
165  if( speed > 0 )
166  m_movementTimeAcc += pDt;
167  else
168  m_movementTimeAcc = 0;
169 
170  aimChangeX += m_movementAmplitudeX * speed * Math.Sin(Math.PI2 * m_movementFrequencyX * m_movementTimeAcc);
171  aimChangeY += m_movementAmplitudeY * speed * Math.Sin(Math.PI2 * m_movementFrequencyY * m_movementTimeAcc);
172  }
173 
174  aimChangeYPR[0] = Math.SmoothCD(aimChangeYPR[0], -(m_dynamicsStrength * aimChangeY), m_velocityYaw, m_dynamicsSmoothTime, 1000, pDt);
175  aimChangeYPR[1] = Math.SmoothCD(aimChangeYPR[1], -(m_dynamicsStrength * aimChangeX), m_velocityPitch, m_dynamicsSmoothTime, 1000, pDt);
176  aimChangeYPR[2] = 0;
177 
178  vector dynamics[4];
179  Math3D.YawPitchRollMatrix(aimChangeYPR, dynamics);
180  dynamics[3] = vector.Zero;
181 
182  // aiming model offsets
183  vector aimingMatTM[4];
184  hia.WeaponGetAimingModelDirTm(aimingMatTM);
185 
186  // final offset matrix
187  Math3D.MatrixMultiply4(dynamics, aimingMatTM, dynamics);
188  Math3D.MatrixMultiply4(dynamics, matTM, pOutResult.m_CameraTM);
189 
190  AdjustCameraParameters(pDt, pOutResult);
191  UpdateBatteryOptics(GetCurrentSightEntity());
193 
194  if(m_CameraShake)
195  {
196  float x,y;
197  m_CameraShake.Update(pDt, x, y);
198  DayZPlayerImplement.Cast(m_pPlayer).GetAimingModel().SetCamShakeValues(x, y);
199  }
200  }
201 
202  override vector GetBaseAngles()
203  {
204  vector a;
205  a[0] = m_fUpDownAngle;
206  a[1] = m_fLeftRightAngle;
207  a[2] = 0;
208  return a;
209  }
210 
211  override vector GetAdditiveAngles()
212  {
213  vector a;
214  a[0] = m_fUpDownAngleAdd;
215  a[1] = m_fLeftRightAngleAdd;
216  a[2] = 0;
217  return a;
218  }
219 
220  void AdjustCameraParameters(float pDt, inout DayZPlayerCameraResult pOutResult)
221  {
222  pOutResult.m_iDirectBone = m_iBoneIndex;
223  pOutResult.m_iDirectBoneMode = 4;
224 
225  pOutResult.m_fFovAbsolute = HoldBreathFOVEffect(pDt);
226 
227  pOutResult.m_bUpdateWhenBlendOut = false;
228  pOutResult.m_fDistance = 0;
229  pOutResult.m_fUseHeading = 0;
230  pOutResult.m_fInsideCamera = 1.0;
231  pOutResult.m_fShootFromCamera = m_fShootFromCamera;
232 
233  pOutResult.m_fNearPlane = 0.04; //0.07 default
234  }
235 
236  float HoldBreathFOVEffect(float pDt)
237  {
238  if (m_pPlayer.IsHoldingBreath())
239  {
240  m_fFovAbsolute = Math.SmoothCD(m_fFovAbsolute, GameConstants.DZPLAYER_CAMERA_FOV_EYEZOOM, m_fFovAbsVel, 0.1, 1000, pDt);
241  }
242  else if (m_isEntering) //sets FOV immediatelly to avoid "floating camera" effect
243  {
244  m_fFovAbsolute = GameConstants.DZPLAYER_CAMERA_FOV_IRONSIGHTS;
245  m_isEntering = false;
246  }
247  else
248  {
249  m_fFovAbsolute = Math.SmoothCD(m_fFovAbsolute, GameConstants.DZPLAYER_CAMERA_FOV_IRONSIGHTS, m_fFovAbsVel, 0.1, 1000, pDt);
250  }
251 
252  return m_fFovAbsolute;
253  }
254 
255  // sets PP for ironsights and optics (override) cameras
256  override void SetCameraPP(bool state, DayZPlayerCamera launchedFrom)
257  {
258  //Print("SetCameraPP - ADS");
259  if (PlayerBase.Cast(m_pPlayer) && launchedFrom.Type() != PlayerBase.Cast(m_pPlayer).GetCurrentPlayerCamera().Type())
260  {
261  //Print("DayZPlayerCameraIronsights | SetCameraPP | skipping, wrong camera type active!");
262  return;
263  }
264 
265  //if (!state || !m_weaponUsed || (PlayerBase.Cast(m_pPlayer) && launchedFrom != PlayerBase.Cast(m_pPlayer).GetCurrentPlayerCamera()))
266  if (!state || !m_weaponUsed)
267  {
268  m_RequesterADS.Stop();
269 
270  if (IsCameraNV())
271  {
273  }
274  else
275  {
277  }
278  }
279  else
280  {
281  temp_array = {false, 0.0, 0.0, 0.0, 0.0, 1.0};
282 
283  if (m_weaponUsed.GetWeaponDOF() || (m_opticsUsed && m_opticsUsed.GetOpticsDOF()))
284  {
285  if (m_opticsUsed && m_opticsUsed.GetOpticsDOF().Count() == 6)
286  {
287  temp_array = m_opticsUsed.GetOpticsDOF();
288  }
289  else
290  {
291  temp_array = m_weaponUsed.GetWeaponDOF();
292  }
293  if (temp_array.Count() != 6)
294  temp_array = {false, 0.0, 0.0, 0.0, 0.0, 1.0};
295  }
296 
297  m_RequesterADS.SetValuesIronsights(temp_array); //DOF only
298 
299  if (IsCameraNV())
300  {
302  }
303  else
304  {
306  }
307  }
308 
309  if (m_weaponUsed)
310  {
311  m_weaponUsed.HideWeaponBarrel(false);
312  }
313  }
314 
315  override string GetCameraName()
316  {
317  return "DayZPlayerCameraIronsights";
318  }
319 
320  override void SetCameraPPDelay(DayZPlayerCamera pPrevCamera)
321  {
322  if (pPrevCamera.GetCameraName() == "DayZPlayerCamera1stPerson")
323  {
324  //Print("---ironsights---DayZPlayerCamera1stPerson");
325  m_CameraPPDelay = DayZPlayerCameras.TIME_CAMERACHANGE_01;
326  }
327  else if (pPrevCamera.GetCameraName() == "DayZPlayerCameraOptics")
328  {
329  m_CameraPPDelay = 0;
330  }
331  else
332  {
333  //Print("---ironsights---else");
334  m_CameraPPDelay = DayZPlayerCameras.TIME_CAMERACHANGE_02;
335  }
336  }
337 
338  void UpdateBatteryOptics(EntityAI entity)
339  {
340  ItemOptics optics = ItemOptics.Cast(entity);
341  if (optics)
342  optics.UpdateOpticsReddotVisibility();
343  }
344 
346  protected float m_fShootFromCamera = 0.0;
347 
349  protected int m_iBoneIndex;
350  protected vector m_OpticsCamPos;
351  protected vector m_OpticsCamDir;
352 
353  protected float m_fUpDownAngle;
354  protected float m_fUpDownAngleAdd;
355  protected float m_fLeftRightAngle;
356  protected float m_fLeftRightAngleAdd;
357 
358 }
359 
360 class DayZPlayerCameraOptics : DayZPlayerCameraIronsights
361 {
362  static const float CONST_NEARPLANE_OPTICS = 0.06; //Default near plane value for this camera
363  protected float m_RecoilOffsetZ = 0.0;
364 
366  {
367  if (!temp_array)
368  temp_array = new array<float>;
369  m_fShootFromCamera = 0;
370  }
371 
372  override void Init()
373  {
374  if (m_opticsUsed && m_opticsUsed.IsNVOptic() && m_opticsUsed.IsWorking())
375  {
376  SetCameraNV(true);
377  }
378  else
379  {
380  SetCameraNV(false);
381  }
382  }
383 
385  {
386  return m_opticsUsed;
387  }
388 
389  override bool GetCurrentSightInfo (out vector camPos, out vector camDir)
390  {
391  if (m_opticsUsed)
392  {
393  m_opticsUsed.UseWeaponIronsightsOverride(false);
394  m_opticsUsed.GetCameraPoint(camPos, camDir);
395  return true;
396  }
397  return false;
398  }
399 
400  override void OnActivate (DayZPlayerCamera pPrevCamera, DayZPlayerCameraResult pPrevCameraResult)
401  {
402  super.OnActivate(pPrevCamera,pPrevCameraResult);
403 
404  PlayerBase player = PlayerBase.Cast(m_pPlayer);
405  if (player && m_opticsUsed)
406  {
407  GetGame().GetCallQueue(CALL_CATEGORY_GUI).CallLater(player.HideClothing,m_CameraPPDelay*1000,false,m_opticsUsed,true);
408  }
409  }
410 
411  override void AdjustCameraParameters(float pDt, inout DayZPlayerCameraResult pOutResult)
412  {
413  pOutResult.m_iDirectBone = m_iBoneIndex;
414  pOutResult.m_iDirectBoneMode = 4;
415 
416  pOutResult.m_fFovAbsolute = HoldBreathFOVEffect(pDt);
417 
418  pOutResult.m_bUpdateWhenBlendOut = false;
419  pOutResult.m_fDistance = 0;
420  pOutResult.m_fUseHeading = 0;
421  pOutResult.m_fInsideCamera = 1.0;
422  pOutResult.m_fShootFromCamera = m_fShootFromCamera;
423 
424  if (!m_opticsUsed)
425  pOutResult.m_fNearPlane = Math.Clamp(CONST_NEARPLANE_OPTICS - m_RecoilOffsetZ, CONST_NEARPLANE_OPTICS, 10.0);
426  else
427  pOutResult.m_fNearPlane = Math.Clamp(m_opticsUsed.GetNearPlaneValue() - m_RecoilOffsetZ, CONST_NEARPLANE_OPTICS, 10.0); //some sufficiently nonsensical max
428  }
429 
430  override float HoldBreathFOVEffect(float pDt)
431  {
432  //hotfix; two cameras exist and update simultaneously during transition, even if optics/weapons is no longer present!
433  /*PlayerBase player = PlayerBase.Cast(m_pPlayer);
434  if (player && player.GetCurrentCamera() != this)
435  return 0.6;*/
436 
437  ItemOptics optics = ItemOptics.Cast( GetCurrentSightEntity() );
438  if (optics)
439  {
440  if (optics.GetCurrentStepFOV() >= GameConstants.DZPLAYER_CAMERA_FOV_EYEZOOM && (m_pPlayer.IsHoldingBreath() || m_pPlayer.GetEyeZoomLevel()))
441  {
442  m_fFovAbsolute = Math.SmoothCD(m_fFovAbsolute, GameConstants.DZPLAYER_CAMERA_FOV_EYEZOOM, m_fFovAbsVel, 0.1, 1000, pDt);
443  }
444  else if (m_isEntering) //sets FOV immediatelly to avoid "floating camera" effect
445  {
446  m_fFovAbsolute = optics.GetCurrentStepFOV();
447  m_isEntering = false;
448  }
449  else
450  {
451  m_fFovAbsolute = Math.SmoothCD(m_fFovAbsolute, optics.GetCurrentStepFOV(), m_fFovAbsVel, 0.1, 1000, pDt);
452  //m_fFovAbsolute = optics.GetCurrentStepFOV();
453  }
454  return m_fFovAbsolute;
455  }
456  else
457  {
458  //Error("optic camera, but there is no optic item or optic on weapon"); //camera update ticks on transitions as well, caused problems
459  return 0.6; //TODO figure some other way to get original FOV here!
460  }
461  }
462 
463  override void SetCameraPP(bool state,DayZPlayerCamera launchedFrom)
464  {
465  //Print("SetCameraPP - optics");
466  if (PlayerBase.Cast(m_pPlayer) && launchedFrom.Type() != PlayerBase.Cast(m_pPlayer).GetCurrentPlayerCamera().Type())
467  {
468  //Print("DayZPlayerCameraOptics | SetCameraPP | skipping, wrong camera type active!");
469  return;
470  }
471 
472  if (!state || !m_opticsUsed)
473  {
474  m_RequesterADS.Stop();
475 
476  if (IsCameraNV())
477  {
479  }
480  else
481  {
483  }
484 
485  if (m_weaponUsed)
486  {
487  m_weaponUsed.HideWeaponBarrel(false);
488  }
489  }
490  else
491  {
492  array<float> lens_values = new array<float>;
493  array<float> mask_values = new array<float>;
494  float gauss = 0.0;
495  temp_array = {false, 0.0, 0.0, 0.0, 0.0, 1.0};
496 
497  // 1x scopes only
498  if (m_opticsUsed.AllowsDOF() && !NVGoggles.Cast(m_opticsUsed))
499  {
500  if (m_weaponUsed)
501  {
502  if (m_opticsUsed.GetOpticsDOF().Count() == 6)
503  {
504  temp_array = m_opticsUsed.GetOpticsDOF();
505  }
506  else
507  {
508  temp_array = m_weaponUsed.GetWeaponDOF(); //TODO should some optics have own DOF settings (different eye point)?
509  }
510 
511  if (temp_array.Count() != 6)
512  temp_array = {false, 0.0, 0.0, 0.0, 0.0, 1.0};
513  }
514 
515  m_RequesterADS.SetValuesIronsights(temp_array); //DOF only
516 
517  // optics NV mode
518  if (m_opticsUsed.IsNVOptic())
519  {
520  SetCameraNV(true);
521  SetNVPostprocess(m_opticsUsed.GetCurrentNVType());
522  }
523  else
524  {
525  if (IsCameraNV())
526  {
528  }
529  else
530  {
532  }
533  }
534  }
535  else //magnifying scopes
536  {
537  // optics mask
538  if (m_opticsUsed.GetOpticsPPMask() && m_opticsUsed.GetOpticsPPMask().Count() == 4)
539  {
540  mask_values = m_opticsUsed.GetOpticsPPMask();
541  }
542 
543  //optics lens
544  if (m_opticsUsed.GetOpticsPPLens() && m_opticsUsed.GetOpticsPPLens().Count() == 4)
545  {
546  lens_values = m_opticsUsed.GetOpticsPPLens();
547  }
548 
549  //optics blur
550  if (m_opticsUsed.GetOpticsPPBlur() != 0)
551  {
552  gauss = m_opticsUsed.GetOpticsPPBlur();
553  }
554 
555  m_RequesterADS.SetValuesOptics(mask_values,lens_values,gauss);
556 
557  // optics NV mode
558  if (m_opticsUsed.IsNVOptic())
559  {
560  SetCameraNV(true);
561  SetNVPostprocess(m_opticsUsed.GetCurrentNVType());
562  }
563  else
564  {
565  SetNVPostprocess(NVTypes.NONE); //magnifying optics do not combine with other NV sources (would render NV optics obsolete)
566  }
567  }
568 
569  if (m_weaponUsed)
570  {
571  m_weaponUsed.HideWeaponBarrel(true);
572  }
573  }
574  }
575 
576  override string GetCameraName()
577  {
578  return "DayZPlayerCameraOptics";
579  }
580 
581  override void SetCameraPPDelay(DayZPlayerCamera pPrevCamera)
582  {
583  if (pPrevCamera.GetCameraName() == "DayZPlayerCameraIronsights")
584  {
585  m_CameraPPDelay = DayZPlayerCameras.TIME_CAMERACHANGE_02 - 0.05;
586  }
587  else if (pPrevCamera.GetCameraName() == "DayZPlayerCamera1stPerson")
588  {
589  m_CameraPPDelay = DayZPlayerCameras.TIME_CAMERACHANGE_02 - 0.05; //changed to accomodate handheld optics, had to be changed here also
590  }
591  else if (!pPrevCamera.IsCamera3rdRaised())
592  {
593  m_CameraPPDelay = DayZPlayerCameras.TIME_CAMERACHANGE_03 - 0.05;
594  }
595  else
596  {
597  m_CameraPPDelay = DayZPlayerCameras.TIME_CAMERACHANGE_02 - 0.05;
598  }
599  }
600 
601  override void SendRecoilOffsetZ(float offset)
602  {
603  m_RecoilOffsetZ = offset;
604  }
605 };
606 
m_CameraPPDelay
protected float m_CameraPPDelay
Definition: dayzplayercamera_base.c:556
m_RecoilOffsetZ
protected float m_RecoilOffsetZ
Definition: dayzplayercameraironsights.c:363
GetGame
proto native CGame GetGame()
CONST_UD_MIN
class DayZPlayerCamera1stPersonVehicle extends DayZPlayerCamera1stPerson CONST_UD_MIN
down limit
m_fFovAbsVel
protected float m_fFovAbsVel[1]
Definition: dayzplayercamera_base.c:552
SendRecoilOffsetZ
override void SendRecoilOffsetZ(float offset)
Definition: dayzplayercameraironsights.c:601
UpdateUDAngleUnlocked
float UpdateUDAngleUnlocked(out float pAngle, out float pAngleAdd, float pMin, float pMax, float pDt)
Definition: dayzplayercamera_base.c:129
m_iBoneIndex
protected int m_iBoneIndex
main bone
Definition: dayzplayercamera1stperson.c:86
m_weaponUsed
protected Weapon_Base m_weaponUsed
Definition: dayzplayercamera_base.c:73
CONST_NEARPLANE_OPTICS
class DayZPlayerCameraIronsights extends DayZPlayerCameraBase CONST_NEARPLANE_OPTICS
DayZPlayerCamera
class DayZPlayerCameraResult DayZPlayerCamera(DayZPlayer pPlayer, HumanInputController pInput)
Definition: dayzplayer.c:56
GetCurrentSightInfo
override bool GetCurrentSightInfo(out vector camPos, out vector camDir)
Definition: dayzplayercameraironsights.c:389
m_fLeftRightAngle
protected float m_fLeftRightAngle
left right angle in rad (in freelook only)
Definition: dayzplayercamera1stperson.c:91
SetNVPostprocess
void SetNVPostprocess(int NVtype)
DayZPlayerCameraOptics handles this separately, otherwise it takes active NVType from PlayerBase::Get...
Definition: dayzplayercamera_base.c:457
y
Icon y
DayZPlayerCameraOptics
void DayZPlayerCameraOptics(DayZPlayer pPlayer, HumanInputController pInput)
Definition: dayzplayercameraironsights.c:365
Print
proto void Print(void var)
Prints content of variable to console/log.
Init
override void Init()
Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside o...
Definition: dayzplayercameraironsights.c:372
m_fFovAbsolute
float m_fFovAbsolute
fov absolute value override - -1.0 default, if set - overrides absolute fov setting
Definition: dayzplayer.c:5
HoldBreathFOVEffect
override float HoldBreathFOVEffect(float pDt)
Definition: dayzplayercameraironsights.c:430
GetAdditiveAngles
vector GetAdditiveAngles()
Definition: dayzplayer.c:87
UpdateLRAngleUnlocked
float UpdateLRAngleUnlocked(out float pAngle, out float pAngleAdd, float pMin, float pMax, float pDt)
Definition: dayzplayercamera_base.c:170
DayZPlayer
Definition: dayzplayerimplement.c:72
CALL_CATEGORY_GUI
const int CALL_CATEGORY_GUI
Definition: tools.c:9
DayZPlayerCameras
Definition: dayzplayercameras.c:1
ErrorEx
enum ShapeType ErrorEx
m_CameraShake
protected ref CameraShake m_CameraShake
Definition: dayzplayercamera_base.c:75
m_pInput
protected HumanInputController m_pInput
human input
Definition: dayzplayer.c:136
m_WeaponSwayModifier
protected float m_WeaponSwayModifier
Definition: dayzplayercamera_base.c:555
PlayerBase
Definition: playerbaseclient.c:1
m_pPlayer
protected DayZPlayer m_pPlayer
data
Definition: dayzplayer.c:135
vector
Definition: enconvert.c:105
m_CurrentCameraPitch
protected float m_CurrentCameraPitch
Definition: dayzplayercamera_base.c:559
OnActivate
override void OnActivate(DayZPlayerCamera pPrevCamera, DayZPlayerCameraResult pPrevCameraResult)
Definition: dayzplayercameraironsights.c:400
m_fUpDownAngleAdd
protected float m_fUpDownAngleAdd
up down angle in rad
Definition: dayzplayercamera1stperson.c:90
NVTypes
NVTypes
Definition: dayzplayercamera_base.c:54
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
DayZPlayerCameraResult
Definition: dayzplayer.c:11
OnUpdate
proto native void OnUpdate()
Definition: tools.c:349
HumanCommandMove
Definition: human.c:433
ErrorExSeverity
ErrorExSeverity
Definition: endebug.c:61
m_fShootFromCamera
float m_fShootFromCamera
1(default) - uses shoot from camera (+aiming sway), 0 pure weapon shoot (ironsights == 0)
Definition: dayzplayer.c:16
m_fUpDownAngle
protected float m_fUpDownAngle
up down angle in rad
Definition: dayzplayercamera1stperson.c:89
DayZPlayerImplement
Definition: manbase.c:1
HumanInputController
Definition: human.c:17
array< float >
SetCameraPP
override void SetCameraPP(bool state, DayZPlayerCamera launchedFrom)
Definition: dayzplayercameraironsights.c:463
DayZPlayerCameraBase
this is main camera class
Definition: dayzplayercamera1stperson.c:4
x
Icon x
IsCameraNV
bool IsCameraNV()
Definition: dayzplayercamera_base.c:386
GetPlayer
protected void GetPlayer()
Definition: crosshairselector.c:127
SetCameraPPDelay
override void SetCameraPPDelay(DayZPlayerCamera pPrevCamera)
Definition: dayzplayercameraironsights.c:581
GameConstants
Definition: constants.c:612
GetCameraNVType
int GetCameraNVType()
Definition: dayzplayercamera_base.c:396
m_CurrentCameraYaw
protected float m_CurrentCameraYaw
Definition: dayzplayercamera_base.c:558
Weapon_Base
shorthand
Definition: boltactionrifle_base.c:5
AdjustCameraParameters
override void AdjustCameraParameters(float pDt, inout DayZPlayerCameraResult pOutResult)
Definition: dayzplayercameraironsights.c:411
ItemOptics
Definition: itemoptics.c:1
HumanItemAccessor
private void HumanItemAccessor()
Definition: humanitems.c:141
m_opticsUsed
protected ItemOptics m_opticsUsed
Definition: dayzplayercamera_base.c:74
GetCameraName
override string GetCameraName()
Definition: dayzplayercameraironsights.c:576
Math
Definition: enmath.c:6
GetBaseAngles
vector GetBaseAngles()
Definition: dayzplayer.c:82
Class
Super root of all classes in Enforce script.
Definition: enscript.c:10
EntityAI
Definition: building.c:5
SetCameraNV
void SetCameraNV(bool nightvision)
Definition: dayzplayercamera_base.c:381
Math3D
Definition: enmath3d.c:27
GetCurrentSightEntity
override EntityAI GetCurrentSightEntity()
Definition: dayzplayercameraironsights.c:384
m_fLeftRightAngleAdd
protected float m_fLeftRightAngleAdd
left right angle in rad (in freelook only)
Definition: dayzplayercamera1stperson.c:92
UpdateCameraNV
void UpdateCameraNV(PlayerBase player)
Definition: dayzplayercamera_base.c:401