DayZ 1.24
Loading...
Searching...
No Matches
DayZPlayerCameras.c
Go to the documentation of this file.
2{
3 static const int DAYZCAMERA_1ST = 1;
4 static const int DAYZCAMERA_3RD_ERC = 2;
5 static const int DAYZCAMERA_3RD_ERC_SPR = 3;
6 static const int DAYZCAMERA_3RD_ERC_RAISED = 4;
7 static const int DAYZCAMERA_3RD_CRO = 5;
8 static const int DAYZCAMERA_3RD_CRO_RAISED = 6;
9 static const int DAYZCAMERA_3RD_PRO = 7;
10 static const int DAYZCAMERA_3RD_PRO_RAISED = 8;
11 static const int DAYZCAMERA_3RD_ERC_RAISED_MELEE = 9;
12 static const int DAYZCAMERA_IRONSIGHTS = 10;
13 static const int DAYZCAMERA_OPTICS = 11;
14 static const int DAYZCAMERA_1ST_UNCONSCIOUS = 12;
15 static const int DAYZCAMERA_3RD_JUMP = 13;
16 static const int DAYZCAMERA_3RD_CLIMB = 14;
17
18 static const int DAYZCAMERA_1ST_VEHICLE = 30;
19 static const int DAYZCAMERA_3RD_VEHICLE = 31;
20
21 static const int PERITEMUD_INVALID = -1;
22 static const int PERITEMUD_EMPTYHANDED = 20;
23 static const int PERITEMUD_ONEHANDED = 25;
24 static const int PERITEMUD_TWOHANDED = 30;
25
26 // some times for camera changes
27 static const float TIME_CAMERACHANGE_01 = 0.1;
28 static const float TIME_CAMERACHANGE_02 = 0.2;
29 static const float TIME_CAMERACHANGE_03 = 0.3;
30
31
33
34
36 // temporary moved out of the
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 }
135
136
138 static void RegisterTransitionTime(int pFrom, int pTo, float pTime, bool pTwoWay)
139 {
140 int key = (pFrom * 65536) + pTo;
142 if (pTwoWay)
144 }
145
147 static float GetTransitionTime(int pFrom, int pTo)
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 }
157
158
159 static float OnCameraChange(DayZPlayer pPlayer, int pFrom, int pTo)
160 {
162 return transTime;
163 }
164}
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 PERITEMUD_INVALID
static const int PERITEMUD_TWOHANDED
for empty hands
static const int DAYZCAMERA_3RD_ERC_SPR
3rd - standing sprint
static const float TIME_CAMERACHANGE_02
static void RegisterCameras(DayZPlayerType pType)
called from DayZPlayerTypeCreate() fn
static float OnCameraChange(DayZPlayer pPlayer, int pFrom, int pTo)
static const int DAYZCAMERA_3RD_PRO
3rd - laying
static const int PERITEMUD_EMPTYHANDED
uninitialized / invalid per item camera user data
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 ref map< int, float > m_TransitionTimes
static const int PERITEMUD_ONEHANDED
for empty hands
static const int DAYZCAMERA_1ST_VEHICLE
vehicle 1st person
static const int DAYZCAMERA_3RD_JUMP
jump
static float GetTransitionTime(int pFrom, int pTo)
static function to get time from table
void DayZPlayerType()
Definition dayzplayer.c:507