Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
dayzplayercamera_base.c File Reference

Go to the source code of this file.

Enumerations

enum  NVTypes {
  NONE = 0, NV_GOGGLES, NV_GOGGLES_OFF, NV_OPTICS_ON,
  NV_OPTICS_OFF, NV_PUMPKIN, NV_OPTICS_KAZUAR_DAY, NV_OPTICS_KAZUAR_NIGHT,
  NV_OPTICS_STARLIGHT_DAY, NV_OPTICS_STARLIGHT_NIGHT, MAX
}
 

Functions

float Limit (float pV, float pMin, float pMax)
 limit function More...
 
float fixAngle_PI_PI (float pAngle)
 
float fixAngle_180_180 (float pAngle)
 
void DayZPlayerCameraBase (DayZPlayer pPlayer, HumanInputController pInput)
 constructor must be same More...
 
void HandleShoulderCameraOverride (HumanInputController pInput)
 
void ProcessCameraShake (float delta, out float leftRight, out float upDown)
 
void Init ()
 Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system) More...
 
float UpdateUDAngleUnlocked (out float pAngle, out float pAngleAdd, float pMin, float pMax, float pDt)
 
float UpdateLRAngleUnlocked (out float pAngle, out float pAngleAdd, float pMin, float pMax, float pDt)
 
float UpdateUDAngle (out float pAngle, out float pAngleAdd, float pMin, float pMax, float pDt)
 
float UpdateLRAngle (float pAngle, float pMin, float pMax, float pDt)
 
void StdFovUpdate (float pDt, out DayZPlayerCameraResult pOutResult)
 
override void SpawnCameraShakeProper (float strength, float radius, float smoothness, float radius_decay_speed)
 
override void OnUpdate (float pDt, out DayZPlayerCameraResult pOutResult)
 
override void OnActivate (DayZPlayerCamera pPrevCamera, DayZPlayerCameraResult pPrevCameraResult)
 
float GetWeaponSwayModifier ()
 
override string GetCameraName ()
 
void SetCameraPPDelay (DayZPlayerCamera pPrevCamera)
 
void SetCameraNV (bool nightvision)
 
bool IsCameraNV ()
 
void SetCameraNVType (int type)
 
int GetCameraNVType ()
 
void UpdateCameraNV (PlayerBase player)
 
void SetCameraPP (bool state, DayZPlayerCamera launchedFrom)
 by default sets camera PP to zero, regardless of parameter. Override if needed. More...
 
override float GetCurrentYaw ()
 
override float GetCurrentPitch ()
 
override float GetCurrentRoll ()
 
void ForceFreelook (bool state)
 
void SetNVPostprocess (int NVtype)
 DayZPlayerCameraOptics handles this separately, otherwise it takes active NVType from PlayerBase::GetCameraNVType. More...
 
void InitCameraOnPlayer (bool force=false)
 

Variables

enum NVTypes CONST_NEARPLANE_OPTICS_MIN = 0.04
 
protected Weapon_Base m_weaponUsed
 
protected ItemOptics m_opticsUsed
 
protected ref CameraShake m_CameraShake
 
protected float m_fLRAngleVel [1]
 
protected float m_fUDAngleVel [1]
 
protected float m_fFovAbsVel [1]
 
protected float m_fFovAbsolute
 
protected bool m_bForceFreeLook
 
protected float m_WeaponSwayModifier
 
protected float m_CameraPPDelay
 
protected float m_CurrentCameraYaw
 
protected float m_CurrentCameraPitch
 
protected float m_CurrentCameraRoll
 
protected HumanCommandWeapons m_CommandWeapons
 
protected bool m_IsNightvision
 
protected int m_NightvisionType
 

Enumeration Type Documentation

◆ NVTypes

enum NVTypes
Enumerator
NONE 
NV_GOGGLES 
NV_GOGGLES_OFF 
NV_OPTICS_ON 
NV_OPTICS_OFF 
NV_PUMPKIN 
NV_OPTICS_KAZUAR_DAY 
NV_OPTICS_KAZUAR_NIGHT 
NV_OPTICS_STARLIGHT_DAY 
NV_OPTICS_STARLIGHT_NIGHT 
MAX 

Definition at line 54 of file dayzplayercamera_base.c.

Function Documentation

◆ DayZPlayerCameraBase()

void DayZPlayerCameraBase ( DayZPlayer  pPlayer,
HumanInputController  pInput 
)

constructor must be same

Definition at line 78 of file dayzplayercamera_base.c.

◆ fixAngle_180_180()

float fixAngle_180_180 ( float  pAngle)

Definition at line 36 of file dayzplayercamera_base.c.

◆ fixAngle_PI_PI()

float fixAngle_PI_PI ( float  pAngle)

Definition at line 19 of file dayzplayercamera_base.c.

◆ ForceFreelook()

void ForceFreelook ( bool  state)

Definition at line 450 of file dayzplayercamera_base.c.

◆ GetCameraName()

override string GetCameraName ( )

Definition at line 372 of file dayzplayercamera_base.c.

◆ GetCameraNVType()

int GetCameraNVType ( )

Definition at line 396 of file dayzplayercamera_base.c.

◆ GetCurrentPitch()

override float GetCurrentPitch ( )

Definition at line 440 of file dayzplayercamera_base.c.

◆ GetCurrentRoll()

override float GetCurrentRoll ( )

Definition at line 445 of file dayzplayercamera_base.c.

◆ GetCurrentYaw()

override float GetCurrentYaw ( )

Definition at line 435 of file dayzplayercamera_base.c.

◆ GetWeaponSwayModifier()

float GetWeaponSwayModifier ( )

Definition at line 367 of file dayzplayercamera_base.c.

◆ HandleShoulderCameraOverride()

void HandleShoulderCameraOverride ( HumanInputController  pInput)

disable override

Definition at line 102 of file dayzplayercamera_base.c.

◆ Init()

void Init ( )

Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)

pre-init arrays

Definition at line 119 of file dayzplayercamera_base.c.

◆ InitCameraOnPlayer()

void InitCameraOnPlayer ( bool  force = false)

Definition at line 541 of file dayzplayercamera_base.c.

◆ IsCameraNV()

bool IsCameraNV ( )

Definition at line 386 of file dayzplayercamera_base.c.

◆ Limit()

float Limit ( float  pV,
float  pMin,
float  pMax 
)

limit function

Definition at line 2 of file dayzplayercamera_base.c.

◆ OnActivate()

override void OnActivate ( DayZPlayerCamera  pPrevCamera,
DayZPlayerCameraResult  pPrevCameraResult 
)

Definition at line 349 of file dayzplayercamera_base.c.

◆ OnUpdate()

override void OnUpdate ( float  pDt,
out DayZPlayerCameraResult  pOutResult 
)

Definition at line 329 of file dayzplayercamera_base.c.

◆ ProcessCameraShake()

void ProcessCameraShake ( float  delta,
out float  leftRight,
out float  upDown 
)

Definition at line 108 of file dayzplayercamera_base.c.

◆ SetCameraNV()

void SetCameraNV ( bool  nightvision)

Definition at line 381 of file dayzplayercamera_base.c.

◆ SetCameraNVType()

void SetCameraNVType ( int  type)

Definition at line 391 of file dayzplayercamera_base.c.

◆ SetCameraPP()

void SetCameraPP ( bool  state,
DayZPlayerCamera  launchedFrom 
)

by default sets camera PP to zero, regardless of parameter. Override if needed.

Definition at line 415 of file dayzplayercamera_base.c.

◆ SetCameraPPDelay()

void SetCameraPPDelay ( DayZPlayerCamera  pPrevCamera)

Definition at line 377 of file dayzplayercamera_base.c.

◆ SetNVPostprocess()

void SetNVPostprocess ( int  NVtype)

DayZPlayerCameraOptics handles this separately, otherwise it takes active NVType from PlayerBase::GetCameraNVType.

Definition at line 457 of file dayzplayercamera_base.c.

◆ SpawnCameraShakeProper()

override void SpawnCameraShakeProper ( float  strength,
float  radius,
float  smoothness,
float  radius_decay_speed 
)

Definition at line 324 of file dayzplayercamera_base.c.

◆ StdFovUpdate()

void StdFovUpdate ( float  pDt,
out DayZPlayerCameraResult  pOutResult 
)

change abs FOV for naked eye zoom

switch shooting from camera to weapon (firearms)

Definition at line 295 of file dayzplayercamera_base.c.

◆ UpdateCameraNV()

void UpdateCameraNV ( PlayerBase  player)

Definition at line 401 of file dayzplayercamera_base.c.

◆ UpdateLRAngle()

float UpdateLRAngle ( float  pAngle,
float  pMin,
float  pMax,
float  pDt 
)

lr angle

Definition at line 261 of file dayzplayercamera_base.c.

◆ UpdateLRAngleUnlocked()

float UpdateLRAngleUnlocked ( out float  pAngle,
out float  pAngleAdd,
float  pMin,
float  pMax,
float  pDt 
)

Definition at line 170 of file dayzplayercamera_base.c.

◆ UpdateUDAngle()

float UpdateUDAngle ( out float  pAngle,
out float  pAngleAdd,
float  pMin,
float  pMax,
float  pDt 
)

pAngle + pAngleAdd == aimingUDAngle + aimingUDAdd now we set pAngleAdd to be the differenc from aimingAngle and we change camera angle to be the aiming angle

lr angle

update it in degrees

Definition at line 209 of file dayzplayercamera_base.c.

◆ UpdateUDAngleUnlocked()

float UpdateUDAngleUnlocked ( out float  pAngle,
out float  pAngleAdd,
float  pMin,
float  pMax,
float  pDt 
)

Definition at line 129 of file dayzplayercamera_base.c.

Variable Documentation

◆ CONST_NEARPLANE_OPTICS_MIN

enum NVTypes CONST_NEARPLANE_OPTICS_MIN = 0.04

◆ m_bForceFreeLook

protected bool m_bForceFreeLook

Definition at line 554 of file dayzplayercamera_base.c.

◆ m_CameraPPDelay

protected float m_CameraPPDelay

Definition at line 556 of file dayzplayercamera_base.c.

◆ m_CameraShake

protected ref CameraShake m_CameraShake

Definition at line 75 of file dayzplayercamera_base.c.

◆ m_CommandWeapons

protected HumanCommandWeapons m_CommandWeapons

Definition at line 562 of file dayzplayercamera_base.c.

◆ m_CurrentCameraPitch

protected float m_CurrentCameraPitch

Definition at line 559 of file dayzplayercamera_base.c.

◆ m_CurrentCameraRoll

protected float m_CurrentCameraRoll

Definition at line 560 of file dayzplayercamera_base.c.

◆ m_CurrentCameraYaw

protected float m_CurrentCameraYaw

Definition at line 558 of file dayzplayercamera_base.c.

◆ m_fFovAbsolute

protected float m_fFovAbsolute

Definition at line 553 of file dayzplayercamera_base.c.

◆ m_fFovAbsVel

protected float m_fFovAbsVel[1]

Definition at line 552 of file dayzplayercamera_base.c.

◆ m_fLRAngleVel

protected float m_fLRAngleVel[1]

Definition at line 550 of file dayzplayercamera_base.c.

◆ m_fUDAngleVel

protected float m_fUDAngleVel[1]

Definition at line 551 of file dayzplayercamera_base.c.

◆ m_IsNightvision

protected bool m_IsNightvision

Definition at line 563 of file dayzplayercamera_base.c.

◆ m_NightvisionType

protected int m_NightvisionType

Definition at line 564 of file dayzplayercamera_base.c.

◆ m_opticsUsed

protected ItemOptics m_opticsUsed

Definition at line 74 of file dayzplayercamera_base.c.

◆ m_WeaponSwayModifier

protected float m_WeaponSwayModifier

Definition at line 555 of file dayzplayercamera_base.c.

◆ m_weaponUsed

protected Weapon_Base m_weaponUsed

Definition at line 73 of file dayzplayercamera_base.c.