DayZ 1.24
Loading...
Searching...
No Matches
DayZPlayerCameras Class Reference
Collaboration diagram for DayZPlayerCameras:
[legend]

Static Private Member Functions

static void RegisterCameras (DayZPlayerType pType)
 called from DayZPlayerTypeCreate() fn
 
static void RegisterTransitionTime (int pFrom, int pTo, float pTime, bool pTwoWay)
 static function to set time to table
 
static float GetTransitionTime (int pFrom, int pTo)
 static function to get time from table
 
static float OnCameraChange (DayZPlayer pPlayer, int pFrom, int pTo)
 

Static Private Attributes

static const int DAYZCAMERA_1ST = 1
 1st person camera
 
static const int DAYZCAMERA_3RD_ERC = 2
 3rd - standing
 
static const int DAYZCAMERA_3RD_ERC_SPR = 3
 3rd - standing sprint
 
static const int DAYZCAMERA_3RD_ERC_RAISED = 4
 3rd - standing raised
 
static const int DAYZCAMERA_3RD_CRO = 5
 3rd - crouch
 
static const int DAYZCAMERA_3RD_CRO_RAISED = 6
 3rd - crouch
 
static const int DAYZCAMERA_3RD_PRO = 7
 3rd - laying
 
static const int DAYZCAMERA_3RD_PRO_RAISED = 8
 3rd - laying raised
 
static const int DAYZCAMERA_3RD_ERC_RAISED_MELEE = 9
 3rd - laying raised
 
static const int DAYZCAMERA_IRONSIGHTS = 10
 ironsights camera
 
static const int DAYZCAMERA_OPTICS = 11
 optics
 
static const int DAYZCAMERA_1ST_UNCONSCIOUS = 12
 unconscious
 
static const int DAYZCAMERA_3RD_JUMP = 13
 jump
 
static const int DAYZCAMERA_3RD_CLIMB = 14
 climb / vault
 
static const int DAYZCAMERA_1ST_VEHICLE = 30
 vehicle 1st person
 
static const int DAYZCAMERA_3RD_VEHICLE = 31
 generic vehicle 3rd person
 
static const int PERITEMUD_INVALID = -1
 
static const int PERITEMUD_EMPTYHANDED = 20
 uninitialized / invalid per item camera user data
 
static const int PERITEMUD_ONEHANDED = 25
 for empty hands
 
static const int PERITEMUD_TWOHANDED = 30
 for empty hands
 
static const float TIME_CAMERACHANGE_01 = 0.1
 for two handed items
 
static const float TIME_CAMERACHANGE_02 = 0.2
 
static const float TIME_CAMERACHANGE_03 = 0.3
 
static ref map< int, floatm_TransitionTimes = new map<int, float>
 

Detailed Description

Definition at line 1 of file DayZPlayerCameras.c.

Member Function Documentation

◆ GetTransitionTime()

static float DayZPlayerCameras::GetTransitionTime ( int pFrom,
int pTo )
inlinestaticprivate

static function to get time from table

Definition at line 147 of file DayZPlayerCameras.c.

148 {
149 int key = (pFrom * 65536) + pTo;
150 float val;
151
152 if (m_TransitionTimes.Find(key, val))
153 return val;
154 else
155 return 0.3;
156 }
static ref map< int, float > m_TransitionTimes

References m_TransitionTimes.

Referenced by OnCameraChange().

◆ OnCameraChange()

static float DayZPlayerCameras::OnCameraChange ( DayZPlayer pPlayer,
int pFrom,
int pTo )
inlinestaticprivate

Definition at line 159 of file DayZPlayerCameras.c.

160 {
162 return transTime;
163 }
static float GetTransitionTime(int pFrom, int pTo)
static function to get time from table

References GetTransitionTime().

◆ RegisterCameras()

static void DayZPlayerCameras::RegisterCameras ( DayZPlayerType pType)
inlinestaticprivate

called from DayZPlayerTypeCreate() fn

this registers camera ids for camera script class implementation which camera is used at the time is specified by DayzPlayerImplement.CamraHandler which returns id

Blend times when changing cameras 3rd person erected camera transition

3rd person crouch camera transitions

3rd person prone camera transitions

vehicle cameras

ironsights camera transitions

optics camera transitions

register function to handle camera changes

Definition at line 37 of file DayZPlayerCameras.c.

38 {
39 pType.ResetCameraCreators();
40
45 pType.RegisterCameraCreator(DAYZCAMERA_1ST, DayZPlayerCamera1stPerson);
50 pType.RegisterCameraCreator(DAYZCAMERA_3RD_CRO_RAISED, DayZPlayerCamera3rdPersonCrouchRaised);
53 pType.RegisterCameraCreator(DAYZCAMERA_IRONSIGHTS, DayZPlayerCameraIronsights);
54 pType.RegisterCameraCreator(DAYZCAMERA_OPTICS, DayZPlayerCameraOptics);
59
62
63
84
90
101
104
110
114
120
125
126 //Uncon camera transitions
131
133 pType.RegisterCameraOnChangeFnStatic(DayZPlayerCameras, "OnCameraChange");
134 }
class DayZPlayerCamera1stPerson extends DayZPlayerCameraBase DayZPlayerCamera1stPersonUnconscious(DayZPlayer pPlayer, HumanInputController pInput)
void DayZPlayerCamera3rdPersonJump(DayZPlayer pPlayer, HumanInputController pInput)
class DayZPlayerCamera3rdPersonJump extends DayZPlayerCamera3rdPersonErc DayZPlayerCamera3rdPersonClimb(DayZPlayer pPlayer, HumanInputController pInput)
class DayZPlayerCamera3rdPersonProne extends DayZPlayerCamera3rdPersonProneBase DayZPlayerCamera3rdPersonProneRaised(DayZPlayer pPlayer, HumanInputController pInput)
void DayZPlayerCamera3rdPersonProne(DayZPlayer pPlayer, HumanInputController pInput)
void DayZPlayerCamera3rdPersonErcSpr(DayZPlayer pPlayer, HumanInputController pInput)
void DayZPlayerCameraOptics(DayZPlayer pPlayer, HumanInputController pInput)
void DayZPlayerCamera3rdPersonVehicle(DayZPlayer pPlayer, HumanInputController pInput)
static const float TIME_CAMERACHANGE_03
static const int DAYZCAMERA_OPTICS
optics
static const int DAYZCAMERA_1ST
1st person camera
static const int DAYZCAMERA_3RD_PRO_RAISED
3rd - laying raised
static const int DAYZCAMERA_3RD_CLIMB
climb / vault
static const int DAYZCAMERA_3RD_CRO_RAISED
3rd - crouch
static const int DAYZCAMERA_3RD_ERC_SPR
3rd - standing sprint
static const float TIME_CAMERACHANGE_02
static const int DAYZCAMERA_3RD_PRO
3rd - laying
static const float TIME_CAMERACHANGE_01
for two handed items
static void RegisterTransitionTime(int pFrom, int pTo, float pTime, bool pTwoWay)
static function to set time to table
static const int DAYZCAMERA_3RD_VEHICLE
generic vehicle 3rd person
static const int DAYZCAMERA_3RD_ERC
3rd - standing
static const int DAYZCAMERA_IRONSIGHTS
ironsights camera
static const int DAYZCAMERA_3RD_CRO
3rd - crouch
static const int DAYZCAMERA_3RD_ERC_RAISED
3rd - standing raised
static const int DAYZCAMERA_1ST_UNCONSCIOUS
unconscious
static const int DAYZCAMERA_3RD_ERC_RAISED_MELEE
3rd - laying raised
static const int DAYZCAMERA_1ST_VEHICLE
vehicle 1st person
static const int DAYZCAMERA_3RD_JUMP
jump

References DAYZCAMERA_1ST, DAYZCAMERA_1ST_UNCONSCIOUS, DAYZCAMERA_1ST_VEHICLE, DAYZCAMERA_3RD_CLIMB, DAYZCAMERA_3RD_CRO, DAYZCAMERA_3RD_CRO_RAISED, DAYZCAMERA_3RD_ERC, DAYZCAMERA_3RD_ERC_RAISED, DAYZCAMERA_3RD_ERC_RAISED_MELEE, DAYZCAMERA_3RD_ERC_SPR, DAYZCAMERA_3RD_JUMP, DAYZCAMERA_3RD_PRO, DAYZCAMERA_3RD_PRO_RAISED, DAYZCAMERA_3RD_VEHICLE, DAYZCAMERA_IRONSIGHTS, DAYZCAMERA_OPTICS, DayZPlayerCamera1stPersonUnconscious(), DayZPlayerCamera3rdPersonClimb(), DayZPlayerCamera3rdPersonErcSpr(), DayZPlayerCamera3rdPersonJump(), DayZPlayerCamera3rdPersonProne(), DayZPlayerCamera3rdPersonProneRaised(), DayZPlayerCamera3rdPersonVehicle(), DayZPlayerCameraOptics(), RegisterTransitionTime(), TIME_CAMERACHANGE_01, TIME_CAMERACHANGE_02, and TIME_CAMERACHANGE_03.

Referenced by DayZPlayerTypeUtils::DayZPlayerTypeCreate().

◆ RegisterTransitionTime()

static void DayZPlayerCameras::RegisterTransitionTime ( int pFrom,
int pTo,
float pTime,
bool pTwoWay )
inlinestaticprivate

static function to set time to table

Definition at line 138 of file DayZPlayerCameras.c.

139 {
140 int key = (pFrom * 65536) + pTo;
142 if (pTwoWay)
144 }

References m_TransitionTimes, and RegisterTransitionTime().

Referenced by RegisterCameras(), and RegisterTransitionTime().

Member Data Documentation

◆ DAYZCAMERA_1ST

const int DayZPlayerCameras::DAYZCAMERA_1ST = 1
staticprivate

1st person camera

Definition at line 3 of file DayZPlayerCameras.c.

Referenced by DayZPlayer::CameraHandler(), and RegisterCameras().

◆ DAYZCAMERA_1ST_UNCONSCIOUS

const int DayZPlayerCameras::DAYZCAMERA_1ST_UNCONSCIOUS = 12
staticprivate

unconscious

Definition at line 14 of file DayZPlayerCameras.c.

Referenced by DayZPlayer::CameraHandler(), and RegisterCameras().

◆ DAYZCAMERA_1ST_VEHICLE

const int DayZPlayerCameras::DAYZCAMERA_1ST_VEHICLE = 30
staticprivate

vehicle 1st person

Definition at line 18 of file DayZPlayerCameras.c.

Referenced by DayZPlayer::CameraHandler(), and RegisterCameras().

◆ DAYZCAMERA_3RD_CLIMB

const int DayZPlayerCameras::DAYZCAMERA_3RD_CLIMB = 14
staticprivate

climb / vault

Definition at line 16 of file DayZPlayerCameras.c.

Referenced by DayZPlayer::CameraHandler(), and RegisterCameras().

◆ DAYZCAMERA_3RD_CRO

const int DayZPlayerCameras::DAYZCAMERA_3RD_CRO = 5
staticprivate

3rd - crouch

Definition at line 7 of file DayZPlayerCameras.c.

Referenced by DayZPlayer::CameraHandler(), and RegisterCameras().

◆ DAYZCAMERA_3RD_CRO_RAISED

const int DayZPlayerCameras::DAYZCAMERA_3RD_CRO_RAISED = 6
staticprivate

3rd - crouch

Definition at line 8 of file DayZPlayerCameras.c.

Referenced by DayZPlayer::CameraHandler(), and RegisterCameras().

◆ DAYZCAMERA_3RD_ERC

const int DayZPlayerCameras::DAYZCAMERA_3RD_ERC = 2
staticprivate

3rd - standing

Definition at line 4 of file DayZPlayerCameras.c.

Referenced by DayZPlayer::CameraHandler(), and RegisterCameras().

◆ DAYZCAMERA_3RD_ERC_RAISED

const int DayZPlayerCameras::DAYZCAMERA_3RD_ERC_RAISED = 4
staticprivate

3rd - standing raised

Definition at line 6 of file DayZPlayerCameras.c.

Referenced by DayZPlayer::CameraHandler(), and RegisterCameras().

◆ DAYZCAMERA_3RD_ERC_RAISED_MELEE

const int DayZPlayerCameras::DAYZCAMERA_3RD_ERC_RAISED_MELEE = 9
staticprivate

3rd - laying raised

Definition at line 11 of file DayZPlayerCameras.c.

Referenced by DayZPlayer::CameraHandler(), and RegisterCameras().

◆ DAYZCAMERA_3RD_ERC_SPR

const int DayZPlayerCameras::DAYZCAMERA_3RD_ERC_SPR = 3
staticprivate

3rd - standing sprint

Definition at line 5 of file DayZPlayerCameras.c.

Referenced by DayZPlayer::CameraHandler(), and RegisterCameras().

◆ DAYZCAMERA_3RD_JUMP

const int DayZPlayerCameras::DAYZCAMERA_3RD_JUMP = 13
staticprivate

jump

Definition at line 15 of file DayZPlayerCameras.c.

Referenced by DayZPlayer::CameraHandler(), and RegisterCameras().

◆ DAYZCAMERA_3RD_PRO

const int DayZPlayerCameras::DAYZCAMERA_3RD_PRO = 7
staticprivate

3rd - laying

Definition at line 9 of file DayZPlayerCameras.c.

Referenced by DayZPlayer::CameraHandler(), and RegisterCameras().

◆ DAYZCAMERA_3RD_PRO_RAISED

const int DayZPlayerCameras::DAYZCAMERA_3RD_PRO_RAISED = 8
staticprivate

3rd - laying raised

Definition at line 10 of file DayZPlayerCameras.c.

Referenced by DayZPlayer::CameraHandler(), and RegisterCameras().

◆ DAYZCAMERA_3RD_VEHICLE

const int DayZPlayerCameras::DAYZCAMERA_3RD_VEHICLE = 31
staticprivate

generic vehicle 3rd person

Definition at line 19 of file DayZPlayerCameras.c.

Referenced by Get3rdPersonCameraType(), and RegisterCameras().

◆ DAYZCAMERA_IRONSIGHTS

const int DayZPlayerCameras::DAYZCAMERA_IRONSIGHTS = 10
staticprivate

ironsights camera

Definition at line 12 of file DayZPlayerCameras.c.

Referenced by DayZPlayer::CameraHandler(), and RegisterCameras().

◆ DAYZCAMERA_OPTICS

const int DayZPlayerCameras::DAYZCAMERA_OPTICS = 11
staticprivate

optics

Definition at line 13 of file DayZPlayerCameras.c.

Referenced by DayZPlayer::CameraHandler(), and RegisterCameras().

◆ m_TransitionTimes

ref map<int, float> DayZPlayerCameras::m_TransitionTimes = new map<int, float>
staticprivate

Definition at line 32 of file DayZPlayerCameras.c.

Referenced by GetTransitionTime(), and RegisterTransitionTime().

◆ PERITEMUD_EMPTYHANDED

const int DayZPlayerCameras::PERITEMUD_EMPTYHANDED = 20
staticprivate

uninitialized / invalid per item camera user data

Definition at line 22 of file DayZPlayerCameras.c.

Referenced by HumanItemBehaviorCfg::SetEmptyHanded(), and HumanItemBehaviorCfg::SetSurrender().

◆ PERITEMUD_INVALID

const int DayZPlayerCameras::PERITEMUD_INVALID = -1
staticprivate

Definition at line 21 of file DayZPlayerCameras.c.

◆ PERITEMUD_ONEHANDED

const int DayZPlayerCameras::PERITEMUD_ONEHANDED = 25
staticprivate

for empty hands

Definition at line 23 of file DayZPlayerCameras.c.

Referenced by HumanItemBehaviorCfg::SetRestrained(), and HumanItemBehaviorCfg::SetToolsOneHanded().

◆ PERITEMUD_TWOHANDED

const int DayZPlayerCameras::PERITEMUD_TWOHANDED = 30
staticprivate

◆ TIME_CAMERACHANGE_01

const float DayZPlayerCameras::TIME_CAMERACHANGE_01 = 0.1
staticprivate

for two handed items

Definition at line 27 of file DayZPlayerCameras.c.

Referenced by RegisterCameras(), and DayZPlayerCameraBase::SetCameraPPDelay().

◆ TIME_CAMERACHANGE_02

const float DayZPlayerCameras::TIME_CAMERACHANGE_02 = 0.2
staticprivate

◆ TIME_CAMERACHANGE_03

const float DayZPlayerCameras::TIME_CAMERACHANGE_03 = 0.3
staticprivate

Definition at line 29 of file DayZPlayerCameras.c.

Referenced by RegisterCameras(), and SetCameraPPDelay().


The documentation for this class was generated from the following file: