Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
dayzplayercamera_base.c
Go to the documentation of this file.
1 float Limit(float pV, float pMin, float pMax)
3 {
4  if (pV >= pMin && pV <= pMax)
5  {
6  return pV;
7  }
8  else if (pV < pMin)
9  {
10  return pMin;
11  }
12  else
13  {
14  return pMax;
15  }
16 }
17 
18 
19 float fixAngle_PI_PI(float pAngle)
20 {
21  while (pAngle > Math.PI)
22  {
23 
24  pAngle -= Math.PI2;
25  }
26 
27  while (pAngle < -Math.PI)
28  {
29 
30  pAngle += Math.PI2;
31  }
32 
33  return pAngle;
34 }
35 
36 float fixAngle_180_180(float pAngle)
37 {
38  while (pAngle > 180)
39  {
40 
41  pAngle -= 360;
42  }
43 
44  while (pAngle < -180)
45  {
46 
47  pAngle += 360;
48  }
49 
50  return pAngle;
51 }
52 
53 
54 enum NVTypes
55 {
56  NONE = 0,
67 }
68 
70 {
71  static const float CONST_NEARPLANE_OPTICS_MIN = 0.04; //Minimal safe near plane value, artifacts on the far plane otherwise!
72 
75  protected ref CameraShake m_CameraShake;
76 
79  {
80  m_fLRAngleVel[0] = 0;
81  m_fUDAngleVel[0] = 0;
82  m_fFovAbsVel[0] = 0;
84 
85  m_fFovAbsolute = GetDayZGame().GetFOVByZoomType(m_pPlayer.GetEyeZoomLevel());
87  /*
88  {
89  int perItemCamUD = pPlayer.GetCurrentPerItemCameraUD();
90  string a = "Per Item Camera User Data: " + perItemCamUD.ToString();
91  Print(a);
92  }
93  */
94  m_CameraPPDelay = 0;
95 
96  m_CommandWeapons = pPlayer.GetCommandModifier_Weapons();
97  Init();
99  };
100 
101  //disabled by default, overrides on select 3rd person cameras
103  {
105  m_pInput.Override3rdIsRightShoulder(HumanInputControllerOverrideType.DISABLED, false);
106  }
107 
108  void ProcessCameraShake(float delta, out float leftRight, out float upDown)
109  {
110  if (m_CameraShake)
111  {
112  float x,y;
113  m_CameraShake.Update(delta, x, y);
114  leftRight += x;
115  upDown += y;
116  }
117  }
118 
119  void Init()
120  {
121  PlayerBase player = PlayerBase.Cast(m_pPlayer);
122  if ( player && player.IsNVGWorking() != IsCameraNV() )
123  {
124  SetCameraNV(player.IsNVGWorking());
125  SetCameraNVType(player.GetNVType());
126  }
127  }
128 
129  float UpdateUDAngleUnlocked(out float pAngle, out float pAngleAdd, float pMin, float pMax, float pDt)
130  {
131  float target = m_CommandWeapons.GetBaseAimingAngleUD();
132 
133  if (m_pInput.CameraIsTracking())
134  {
135  pAngleAdd = m_pInput.GetTracking()[1] * Math.RAD2DEG;
136  pAngle = target;
137 
138  m_fUDAngleVel[0] = 0;
139  }
140  else
141  {
142  if (Math.AbsFloat(pAngleAdd) > 0.001)
143  {
144  pAngleAdd = pAngle + pAngleAdd - target;
145  pAngle = target;
146  }
147 
148  if (m_pInput.CameraIsFreeLook())
149  {
150  pAngleAdd += m_pInput.GetAimDelta(pDt)[1] * Math.RAD2DEG;
151 
152  m_fUDAngleVel[0] = 0;
153  }
154  else
155  {
156  pAngleAdd = Math.SmoothCD(pAngleAdd, 0.0, m_fUDAngleVel, 0.14, 1000, pDt);
157  }
158 
159  if (!m_pInput.CameraIsFreeLook())
160  {
161  pAngle += m_pInput.GetAimDelta(pDt)[1] * Math.RAD2DEG;
162  }
163  }
164 
165  pAngle = Limit(pAngle, pMin, pMax);
166  pAngleAdd = Limit(pAngle + pAngleAdd, pMin, pMax) - pAngle;
167  return pAngle + pAngleAdd;
168  }
169 
170  float UpdateLRAngleUnlocked(out float pAngle, out float pAngleAdd, float pMin, float pMax, float pDt)
171  {
172  float target = 0;
173 
174  if (m_pInput.CameraIsTracking())
175  {
176  pAngleAdd = m_pInput.GetTracking()[0] * Math.RAD2DEG;
177  pAngle = target;
178 
179  m_fUDAngleVel[0] = 0;
180  }
181  else
182  {
183  if (Math.AbsFloat(pAngleAdd) > 0.001)
184  {
185  pAngleAdd = pAngle + pAngleAdd - target;
186  pAngle = target;
187  }
188 
189  if (m_pInput.CameraIsFreeLook() || m_bForceFreeLook)
190  {
191  pAngleAdd += m_pInput.GetAimDelta(pDt)[0] * Math.RAD2DEG;
192 
193  m_fLRAngleVel[0] = 0;
194  }
195  else
196  {
197  pAngleAdd = Math.SmoothCD(pAngleAdd, 0.0, m_fLRAngleVel, 0.14, 1000, pDt);
198  }
199 
200  pAngleAdd = pAngleAdd + pAngle;
201  }
202 
203  pAngle = Limit(pAngle, pMin, pMax);
204  pAngleAdd = Limit(pAngle + pAngleAdd, pMin, pMax) - pAngle;
205 
206  return pAngle + pAngleAdd;
207  }
208 
209  float UpdateUDAngle(out float pAngle, out float pAngleAdd, float pMin, float pMax, float pDt)
210  {
211  if (Math.AbsFloat(pAngleAdd) > 0.001)
212  {
213  float aimingUDAngle = m_CommandWeapons.GetBaseAimingAngleUD();
214 
217 
218  // override actual angle
219  pAngleAdd = pAngle + pAngleAdd - aimingUDAngle;
220  pAngle = aimingUDAngle;
221 
222  // Print("Angle: " + pAngle.ToString() + " Aim: " + actualUDAngle.ToString() );
223  }
224 
226  if( m_pInput.CameraIsFreeLook() )
227  {
228  pAngleAdd += m_pInput.GetAimChange()[1] * Math.RAD2DEG;
229  pAngleAdd = Limit(pAngleAdd, pMin, pMax);
230 
231  m_fUDAngleVel[0] = 0;
232  }
233  else
234  {
235  if( m_pInput.CameraIsTracking() )
236  {
237  pAngleAdd = m_pInput.GetTracking()[1] * Math.RAD2DEG;
238  pAngleAdd = Limit(pAngleAdd, pMin, pMax);
239 
240  m_fUDAngleVel[0] = 0;
241  }
242  else
243  {
245  pAngle += m_pInput.GetAimChange()[1] * Math.RAD2DEG;
246  pAngle = Limit(pAngle, pMin, pMax);
247 
248  pAngleAdd = Math.SmoothCD(pAngleAdd, 0, m_fUDAngleVel, 0.14, 1000, pDt);
249  }
250  }
251 
252  /*{
253  float change = m_pInput.GetAimChange()[1] * Math.RAD2DEG;
254 
255  Print ("Script: Camera ud angle: " + pAngle.ToString() + " change: " + change.ToString() );
256  }*/
257 
258  return Limit(pAngle + pAngleAdd, pMin, pMax);
259  }
260 
261  float UpdateLRAngle(float pAngle, float pMin, float pMax, float pDt)
262  {
264  if (m_pInput.CameraIsFreeLook() || m_bForceFreeLook)
265  {
267  pAngle += m_pInput.GetAimChange()[0] * Math.RAD2DEG;
268  pAngle = Limit(pAngle, pMin, pMax);
269 
270  m_fLRAngleVel[0] = 0; // reset filter
271 
272  }
273  else
274  {
275  if( m_pInput.CameraIsTracking() )
276  {
277  pAngle = m_pInput.GetTracking()[0] * Math.RAD2DEG;
278  pAngle = Limit(-pAngle, pMin, pMax);
279 
280  m_fLRAngleVel[0] = 0; // reset filter
281  }
282  else
283  {
284  // smooth value back to 0
285  pAngle = Math.SmoothCD(pAngle, 0, m_fLRAngleVel, 0.14, 1000, pDt);
286  // m_fLeftRightAngle = 0.9 * (1.0 - pDt);
287  }
288  }
289 
290  return pAngle;
291  }
292 
293 
294 
295  void StdFovUpdate(float pDt, out DayZPlayerCameraResult pOutResult)
296  {
298  switch (m_pPlayer.GetEyeZoomLevel())
299  {
300  // ordered in likelihood of occurance for perf. reasons
301  case ECameraZoomType.NONE:
302  m_fFovAbsolute = Math.SmoothCD(m_fFovAbsolute, GetDayZGame().GetFOVByZoomType(ECameraZoomType.NONE), m_fFovAbsVel, 0.1, 1000, pDt);
303  break;
304  case ECameraZoomType.NORMAL:
305  m_fFovAbsolute = Math.SmoothCD(m_fFovAbsolute, GetDayZGame().GetFOVByZoomType(ECameraZoomType.NORMAL), m_fFovAbsVel, 0.1, 1000, pDt);
306  break;
307  case ECameraZoomType.SHALLOW:
308  m_fFovAbsolute = Math.SmoothCD(m_fFovAbsolute, GetDayZGame().GetFOVByZoomType(ECameraZoomType.SHALLOW), m_fFovAbsVel, 0.1, 1000, pDt);
309  break;
310  default:
311  m_fFovAbsolute = Math.SmoothCD(m_fFovAbsolute, GetDayZGame().GetFOVByZoomType(ECameraZoomType.NONE), m_fFovAbsVel, 0.1, 1000, pDt);
312  break;
313  }
314 
315  pOutResult.m_fFovAbsolute = m_fFovAbsolute;
316 
318  if (!m_pPlayer.IsShootingFromCamera())
319  {
320  pOutResult.m_fShootFromCamera = 0.0;
321  }
322  }
323 
324  override void SpawnCameraShakeProper(float strength, float radius, float smoothness, float radius_decay_speed)
325  {
326  m_CameraShake = new CameraShake(strength, radius, smoothness, radius_decay_speed);
327  }
328 
329  override void OnUpdate(float pDt, out DayZPlayerCameraResult pOutResult)
330  {
331  if (!m_pPlayer || !PlayerBase.Cast(m_pPlayer))
332  {
333  Debug.Log("DayZPlayerCameraBase | OnUpdate | no player!");
334  return;
335  }
336 
337  if (PlayerBase.Cast(m_pPlayer).GetCurrentCamera() != this)
338  {
339  //Print("DayZPlayerCameraBase | OnUpdate | unused camera! | " + this + "/" + PlayerBase.Cast(m_pPlayer).GetCurrentCamera());
340  return;
341  }
342 
343  super.OnUpdate(pDt, pOutResult);
344  StdFovUpdate(pDt, pOutResult);
347  }
348 
349  override void OnActivate(DayZPlayerCamera pPrevCamera, DayZPlayerCameraResult pPrevCameraResult)
350  {
351  InitCameraOnPlayer(true);
352  SetCameraPPDelay(pPrevCamera);
353 
354  if (DayZPlayerCameraBase.Cast(pPrevCamera) && DayZPlayerCameraBase.Cast(pPrevCamera).IsCameraNV() && !IsCameraNV())
355  {
356  PPERequesterBank.GetRequester(PPERequesterBank.REQ_CAMERANV).Start( new Param1<int>(PPERequester_CameraNV.NV_TRANSITIVE) );
357  }
358 
359  GetGame().GetCallQueue(CALL_CATEGORY_GUI).CallLater(SetCameraPP,m_CameraPPDelay*1000,false,true,this); // this takes care of weapon/optics postprocessing
360  DayZPlayerCameraOptics optic_camera;
361  if (DayZPlayerCamera.CastTo(optic_camera,pPrevCamera))
362  {
363  GetGame().GetCallQueue(CALL_CATEGORY_GUI).Call(PlayerBase.Cast(m_pPlayer).HideClothing,null,false);
364  }
365  }
366 
368  {
369  return m_WeaponSwayModifier;
370  }
371 
372  override string GetCameraName()
373  {
374  return "DayZPlayerCameraBase";
375  }
376 
377  void SetCameraPPDelay(DayZPlayerCamera pPrevCamera)
378  {
379  }
380 
381  void SetCameraNV(bool nightvision)
382  {
383  m_IsNightvision = nightvision;
384  }
385 
386  bool IsCameraNV()
387  {
388  return m_IsNightvision;
389  }
390 
391  void SetCameraNVType(int type)
392  {
393  m_NightvisionType = type;
394  }
395 
397  {
398  return m_NightvisionType;
399  }
400 
402  {
403  if ( !player )
404  return;
405 
406  if ( player.IsNVGWorking() != IsCameraNV() || player.GetNVType() != GetCameraNVType() )
407  {
408  SetCameraNV(player.IsNVGWorking());
409  SetCameraNVType(player.GetNVType());
410  SetCameraPP(true, this);
411  }
412  }
413 
415  void SetCameraPP(bool state, DayZPlayerCamera launchedFrom)
416  {
417  PPERequesterBank.GetRequester(PPERequester_CameraADS).Stop();
418 
419  if (IsCameraNV())
420  {
422  }
423  else
424  {
426  }
427 
428  m_weaponUsed = Weapon_Base.Cast(m_pPlayer.GetHumanInventory().GetEntityInHands());
429  if (m_weaponUsed)
430  {
431  m_weaponUsed.HideWeaponBarrel(false);
432  }
433  }
434 
435  override float GetCurrentYaw()
436  {
437  return m_CurrentCameraYaw;
438  }
439 
440  override float GetCurrentPitch()
441  {
442  return m_CurrentCameraPitch;
443  }
444 
445  override float GetCurrentRoll()
446  {
447  return m_CurrentCameraRoll;
448  }
449 
450  void ForceFreelook(bool state)
451  {
452  m_bForceFreeLook = state;
453  }
454 
455  //TODO - better handling of distinct occluder types
457  void SetNVPostprocess(int NVtype)
458  {
459  //Print("+++Setting NV type: " + NVtype + " +++");
460  switch (NVtype)
461  {
462  case NVTypes.NONE:
463  {
464  PPERequesterBank.GetRequester(PPERequester_CameraNV).Stop();
465  if (GetGame().GetMission() && GetGame().GetMission().GetEffectWidgets())
466  {
467  GetGame().GetMission().GetEffectWidgets().RemoveActiveEffects({EffectWidgetsTypes.NVG_OCCLUDER});
468  GetGame().GetMission().GetEffectWidgets().RemoveActiveEffects({EffectWidgetsTypes.PUMPKIN_OCCLUDER});
469  }
470  }
471  break;
472 
473  //night-vision modes
474  case NVTypes.NV_OPTICS_KAZUAR_NIGHT:
475  case NVTypes.NV_OPTICS_STARLIGHT_NIGHT:
476  case NVTypes.NV_OPTICS_ON:
477  {
478  PPERequesterBank.GetRequester(PPERequesterBank.REQ_CAMERANV).Start( new Param1<int>(PPERequester_CameraNV.NV_DEFAULT_OPTICS) );
479  if (GetGame().GetMission() && GetGame().GetMission().GetEffectWidgets())
480  {
481  GetGame().GetMission().GetEffectWidgets().RemoveActiveEffects({EffectWidgetsTypes.NVG_OCCLUDER});
482  GetGame().GetMission().GetEffectWidgets().RemoveActiveEffects({EffectWidgetsTypes.PUMPKIN_OCCLUDER});
483  }
484  }
485  break;
486 
487  //daytime filter modes
488  case NVTypes.NV_OPTICS_KAZUAR_DAY:
489  case NVTypes.NV_OPTICS_STARLIGHT_DAY:
490  {
491  PPERequesterBank.GetRequester(PPERequesterBank.REQ_CAMERANV).Start( new Param1<int>(PPERequester_CameraNV.NV_DAYTIME_OPTICS) );
492  if (GetGame().GetMission() && GetGame().GetMission().GetEffectWidgets())
493  {
494  GetGame().GetMission().GetEffectWidgets().RemoveActiveEffects({EffectWidgetsTypes.NVG_OCCLUDER});
495  GetGame().GetMission().GetEffectWidgets().RemoveActiveEffects({EffectWidgetsTypes.PUMPKIN_OCCLUDER});
496  }
497  }
498  break;
499 
500  case NVTypes.NV_GOGGLES_OFF:
501  case NVTypes.NV_OPTICS_OFF:
502  {
503  PPERequesterBank.GetRequester(PPERequesterBank.REQ_CAMERANV).Start( new Param1<int>(PPERequester_CameraNV.NV_NO_BATTERY) );
504  if (GetGame().GetMission() && GetGame().GetMission().GetEffectWidgets())
505  {
506  GetGame().GetMission().GetEffectWidgets().RemoveActiveEffects({EffectWidgetsTypes.NVG_OCCLUDER});
507  GetGame().GetMission().GetEffectWidgets().RemoveActiveEffects({EffectWidgetsTypes.PUMPKIN_OCCLUDER});
508  }
509  }
510  break;
511 
512  case NVTypes.NV_GOGGLES:
513  {
514  PPERequesterBank.GetRequester(PPERequesterBank.REQ_CAMERANV).Start( new Param1<int>(PPERequester_CameraNV.NV_DEFAULT_GLASSES) );
515  if (GetGame().GetMission() && GetGame().GetMission().GetEffectWidgets())
516  {
517  GetGame().GetMission().GetEffectWidgets().AddActiveEffects({EffectWidgetsTypes.NVG_OCCLUDER});
518  GetGame().GetMission().GetEffectWidgets().RemoveActiveEffects({EffectWidgetsTypes.PUMPKIN_OCCLUDER});
519  }
520  }
521  break;
522 
523  case NVTypes.NV_PUMPKIN:
524  {
525  PPERequesterBank.GetRequester(PPERequesterBank.REQ_CAMERANV).Start( new Param1<int>(PPERequester_CameraNV.NV_PUMPKIN) );
526  if (GetGame().GetMission() && GetGame().GetMission().GetEffectWidgets())
527  {
528  GetGame().GetMission().GetEffectWidgets().AddActiveEffects({EffectWidgetsTypes.PUMPKIN_OCCLUDER});
529  GetGame().GetMission().GetEffectWidgets().RemoveActiveEffects({EffectWidgetsTypes.NVG_OCCLUDER});
530  }
531  }
532  break;
533  }
534 
535  if (PlayerBaseClient.Cast(m_pPlayer))
536  {
537  PlayerBaseClient.Cast(m_pPlayer).SwitchPersonalLight(NVtype < 1);
538  }
539  }
540 
541  void InitCameraOnPlayer(bool force = false)
542  {
543  PlayerBase player = PlayerBase.Cast(m_pPlayer);
544  if (!player.GetCurrentPlayerCamera() || (force && player.GetCurrentPlayerCamera() != this))
545  {
546  player.OnCameraChanged(this);
547  }
548  }
549 
550  protected float m_fLRAngleVel[1];
551  protected float m_fUDAngleVel[1];
552  protected float m_fFovAbsVel[1];
553  protected float m_fFovAbsolute;
554  protected bool m_bForceFreeLook;
555  protected float m_WeaponSwayModifier;
556  protected float m_CameraPPDelay;
557 
558  protected float m_CurrentCameraYaw;
559  protected float m_CurrentCameraPitch;
560  protected float m_CurrentCameraRoll;
561 
563  protected bool m_IsNightvision;
564  protected int m_NightvisionType;
565 }
m_CameraPPDelay
protected float m_CameraPPDelay
Definition: dayzplayercamera_base.c:556
m_bForceFreeLook
protected bool m_bForceFreeLook
Definition: dayzplayercamera_base.c:554
GetGame
proto native CGame GetGame()
fixAngle_PI_PI
float fixAngle_PI_PI(float pAngle)
Definition: dayzplayercamera_base.c:19
m_fUDAngleVel
protected float m_fUDAngleVel[1]
Definition: dayzplayercamera_base.c:551
m_fFovAbsVel
protected float m_fFovAbsVel[1]
Definition: dayzplayercamera_base.c:552
UpdateUDAngleUnlocked
float UpdateUDAngleUnlocked(out float pAngle, out float pAngleAdd, float pMin, float pMax, float pDt)
Definition: dayzplayercamera_base.c:129
ProcessCameraShake
void ProcessCameraShake(float delta, out float leftRight, out float upDown)
Definition: dayzplayercamera_base.c:108
m_weaponUsed
protected Weapon_Base m_weaponUsed
Definition: dayzplayercamera_base.c:73
m_IsNightvision
protected bool m_IsNightvision
Definition: dayzplayercamera_base.c:563
GetDayZGame
DayZGame GetDayZGame()
Definition: dayzgame.c:3729
DayZPlayerCamera
class DayZPlayerCameraResult DayZPlayerCamera(DayZPlayer pPlayer, HumanInputController pInput)
Definition: dayzplayer.c:56
CONST_NEARPLANE_OPTICS_MIN
enum NVTypes CONST_NEARPLANE_OPTICS_MIN
SetNVPostprocess
void SetNVPostprocess(int NVtype)
DayZPlayerCameraOptics handles this separately, otherwise it takes active NVType from PlayerBase::Get...
Definition: dayzplayercamera_base.c:457
UpdateLRAngle
float UpdateLRAngle(float pAngle, float pMin, float pMax, float pDt)
Definition: dayzplayercamera_base.c:261
SetCameraNVType
void SetCameraNVType(int type)
Definition: dayzplayercamera_base.c:391
CameraShake
Definition: camerashake.c:1
y
Icon y
DayZPlayerCameraOptics
void DayZPlayerCameraOptics(DayZPlayer pPlayer, HumanInputController pInput)
Definition: dayzplayercameraironsights.c:365
UpdateUDAngle
float UpdateUDAngle(out float pAngle, out float pAngleAdd, float pMin, float pMax, float pDt)
Definition: dayzplayercamera_base.c:209
ECameraZoomType
ECameraZoomType
Definition: ecamerazoomtype.c:1
UpdateLRAngleUnlocked
float UpdateLRAngleUnlocked(out float pAngle, out float pAngleAdd, float pMin, float pMax, float pDt)
Definition: dayzplayercamera_base.c:170
HandleShoulderCameraOverride
void HandleShoulderCameraOverride(HumanInputController pInput)
Definition: dayzplayercamera_base.c:102
DayZPlayer
Definition: dayzplayerimplement.c:72
NV_OPTICS_KAZUAR_NIGHT
@ NV_OPTICS_KAZUAR_NIGHT
Definition: dayzplayercamera_base.c:63
CALL_CATEGORY_GUI
const int CALL_CATEGORY_GUI
Definition: tools.c:9
Limit
float Limit(float pV, float pMin, float pMax)
limit function
Definition: dayzplayercamera_base.c:2
m_CommandWeapons
protected HumanCommandWeapons m_CommandWeapons
Definition: dayzplayercamera_base.c:562
m_CameraShake
protected ref CameraShake m_CameraShake
Definition: dayzplayercamera_base.c:75
NONE
@ NONE
Definition: dayzplayercamera_base.c:56
m_pInput
protected HumanInputController m_pInput
human input
Definition: dayzplayer.c:136
MAX
@ MAX
Definition: dayzplayercamera_base.c:66
NV_GOGGLES_OFF
@ NV_GOGGLES_OFF
Definition: dayzplayercamera_base.c:58
m_WeaponSwayModifier
protected float m_WeaponSwayModifier
Definition: dayzplayercamera_base.c:555
PlayerBase
Definition: playerbaseclient.c:1
NV_OPTICS_ON
@ NV_OPTICS_ON
Definition: dayzplayercamera_base.c:59
m_pPlayer
protected DayZPlayer m_pPlayer
data
Definition: dayzplayer.c:135
m_CurrentCameraPitch
protected float m_CurrentCameraPitch
Definition: dayzplayercamera_base.c:559
m_fLRAngleVel
protected float m_fLRAngleVel[1]
Definition: dayzplayercamera_base.c:550
NVTypes
NVTypes
Definition: dayzplayercamera_base.c:54
SpawnCameraShakeProper
override void SpawnCameraShakeProper(float strength, float radius, float smoothness, float radius_decay_speed)
Definition: dayzplayercamera_base.c:324
InitCameraOnPlayer
void InitCameraOnPlayer(bool force=false)
Definition: dayzplayercamera_base.c:541
DayZPlayerCameraResult
Definition: dayzplayer.c:11
NV_GOGGLES
@ NV_GOGGLES
Definition: dayzplayercamera_base.c:57
GetCurrentRoll
override float GetCurrentRoll()
Definition: dayzplayercamera_base.c:445
DayZPlayerCameraBase
void DayZPlayerCameraBase(DayZPlayer pPlayer, HumanInputController pInput)
constructor must be same
Definition: dayzplayercamera_base.c:78
HumanInputController
Definition: human.c:17
m_fFovAbsolute
protected float m_fFovAbsolute
Definition: dayzplayercamera_base.c:553
NV_OPTICS_KAZUAR_DAY
@ NV_OPTICS_KAZUAR_DAY
Definition: dayzplayercamera_base.c:62
NV_PUMPKIN
@ NV_PUMPKIN
Definition: dayzplayercamera_base.c:61
DayZPlayerCameraBase
this is main camera class
Definition: dayzplayercamera1stperson.c:4
x
Icon x
IsCameraNV
bool IsCameraNV()
Definition: dayzplayercamera_base.c:386
HumanCommandWeapons
Definition: human.c:986
NV_OPTICS_OFF
@ NV_OPTICS_OFF
Definition: dayzplayercamera_base.c:60
GetCameraNVType
int GetCameraNVType()
Definition: dayzplayercamera_base.c:396
Debug
Definition: debug.c:13
m_CurrentCameraYaw
protected float m_CurrentCameraYaw
Definition: dayzplayercamera_base.c:558
Weapon_Base
shorthand
Definition: boltactionrifle_base.c:5
fixAngle_180_180
float fixAngle_180_180(float pAngle)
Definition: dayzplayercamera_base.c:36
GetCurrentYaw
override float GetCurrentYaw()
Definition: dayzplayercamera_base.c:435
ForceFreelook
void ForceFreelook(bool state)
Definition: dayzplayercamera_base.c:450
ItemOptics
Definition: itemoptics.c:1
NV_OPTICS_STARLIGHT_DAY
@ NV_OPTICS_STARLIGHT_DAY
Definition: dayzplayercamera_base.c:64
GetWeaponSwayModifier
float GetWeaponSwayModifier()
Definition: dayzplayercamera_base.c:367
m_opticsUsed
protected ItemOptics m_opticsUsed
Definition: dayzplayercamera_base.c:74
m_NightvisionType
protected int m_NightvisionType
Definition: dayzplayercamera_base.c:564
StdFovUpdate
void StdFovUpdate(float pDt, out DayZPlayerCameraResult pOutResult)
Definition: dayzplayercamera_base.c:295
Math
Definition: enmath.c:6
NV_OPTICS_STARLIGHT_NIGHT
@ NV_OPTICS_STARLIGHT_NIGHT
Definition: dayzplayercamera_base.c:65
PlayerBaseClient
Definition: survivorbase.c:1
GetCurrentPitch
override float GetCurrentPitch()
Definition: dayzplayercamera_base.c:440
m_CurrentCameraRoll
protected float m_CurrentCameraRoll
Definition: dayzplayercamera_base.c:560
SetCameraNV
void SetCameraNV(bool nightvision)
Definition: dayzplayercamera_base.c:381
Init
void Init()
Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside o...
Definition: dayzplayercamera_base.c:119
HumanInputControllerOverrideType
HumanInputControllerOverrideType
Definition: human.c:7
UpdateCameraNV
void UpdateCameraNV(PlayerBase player)
Definition: dayzplayercamera_base.c:401