Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
dayzintroscenepc.c
Go to the documentation of this file.
1
class
DayZIntroScenePC
:
DayZIntroScene
2
{
3
protected
bool
m_EnableClick
;
4
protected
bool
m_RotatingCharacter
;
5
protected
int
m_RotatingCharacterMouseX
;
6
protected
int
m_RotatingCharacterMouseY
;
7
protected
float
m_RotatingCharacterRot
;
8
protected
float
m_Radius
;
9
protected
float
m_Radius_original
;
10
protected
float
m_DiffX
;
11
protected
float
m_DeltaX
;
12
protected
float
m_DeltaZ
;
13
protected
float
m_Angle
;
14
protected
float
m_Angle_offset
= 0;
15
protected
float
m_NewX
= 0;
16
protected
float
m_NewZ
= 0;
17
protected
float
m_BlurValue
;
18
19
protected
ref OptionsMenu
m_optmenu
;
20
21
// ------------------------------------------------------------
22
void
DayZIntroScenePC
()
23
{
24
SetClickEnable
(
true
);
25
26
m_DeltaX
=
Math
.
AbsFloat
(
m_CharacterPos
[0] -
m_Camera
.GetPosition()[0]);
27
m_DeltaZ
=
Math
.
AbsFloat
(
m_CharacterPos
[2] -
m_Camera
.GetPosition()[2]);
28
29
if
(!
m_Radius
||
m_Radius
== 0)
30
{
31
m_Radius
=
Math
.
Sqrt
(
Math
.
Pow
(
m_DeltaX
, 2) +
Math
.
Pow
(
m_DeltaZ
, 2));
32
m_Radius_original
=
m_Radius
;
33
}
34
}
35
36
protected
override
void
SetInitPostprocesses
()
37
{
38
super.SetInitPostprocesses();
39
40
PPERequester_MenuEffects requester;
41
Class
.
CastTo
(requester,PPERequesterBank.GetRequester(PPERequester_MenuEffects));
42
43
requester.SetVignetteIntensity(0.5);
44
}
45
46
// ------------------------------------------------------------
47
void
SetClickEnable
(
bool
enable )
48
{
49
m_EnableClick
= enable;
50
}
51
52
// ------------------------------------------------------------
53
bool
IsClickEnabled
()
54
{
55
return
m_EnableClick
;
56
}
57
58
// ------------------------------------------------------------
59
void
CharacterRotationStart
()
60
{
61
m_RotatingCharacter
=
true
;
62
GetMousePos
(
m_RotatingCharacterMouseX
,
m_RotatingCharacterMouseY
);
63
64
if
(
m_Character
)
65
{
66
m_RotatingCharacterRot
=
m_CharacterRot
[0];
67
}
68
}
69
70
// ------------------------------------------------------------
71
void
CharacterRotationStop
()
72
{
73
if
(
m_RotatingCharacter
)
74
{
75
m_RotatingCharacter
=
false
;
76
}
77
}
78
79
// ------------------------------------------------------------
80
bool
IsRotatingCharacter
()
81
{
82
return
m_RotatingCharacter
;
83
}
84
85
// ------------------------------------------------------------
86
void
CharacterRotate
()
87
{
88
if
(
m_Character
&&
m_Character
.GetCharacterObj())
89
{
90
int
actual_mouse_x;
91
int
actual_mouse_y;
92
float
coef;
93
GetMousePos
(actual_mouse_x, actual_mouse_y);
94
95
m_DiffX
=
m_RotatingCharacterMouseX
- actual_mouse_x;
96
97
coef = (
m_RotatingCharacterRot
+ (
m_DiffX
* 0.5) ) / 360;
98
coef = coef -
Math
.
Floor
(coef);
99
m_CharacterRot
[0] = coef * 360;
100
101
m_Character
.GetCharacterObj().SetOrientation(
m_CharacterRot
);
102
}
103
}
104
105
// ------------------------------------------------------------
106
void
Update
()
107
{
108
if
(
m_Character
&&
m_RotatingCharacter
)
109
{
110
CharacterRotate
();
111
}
112
}
113
};
Class
Super root of all classes in Enforce script.
Definition
enscript.c:11
DayZIntroScene::m_Camera
Camera m_Camera
Definition
dayzintroscene.c:4
DayZIntroScene::DayZIntroScene
void DayZIntroScene()
Definition
dayzintroscene.c:13
DayZIntroScene::m_CharacterPos
vector m_CharacterPos
Definition
dayzintroscene.c:6
DayZIntroScene::m_Character
ref IntroSceneCharacter m_Character
Definition
dayzintroscene.c:3
DayZIntroScene::m_CharacterRot
vector m_CharacterRot
Definition
dayzintroscene.c:7
DayZIntroScenePC::m_Radius_original
float m_Radius_original
Definition
dayzintroscenepc.c:9
DayZIntroScenePC::m_RotatingCharacterMouseY
int m_RotatingCharacterMouseY
Definition
dayzintroscenepc.c:6
DayZIntroScenePC::m_DeltaZ
float m_DeltaZ
Definition
dayzintroscenepc.c:12
DayZIntroScenePC::CharacterRotationStart
void CharacterRotationStart()
Definition
dayzintroscenepc.c:59
DayZIntroScenePC::CharacterRotationStop
void CharacterRotationStop()
Definition
dayzintroscenepc.c:71
DayZIntroScenePC::m_DeltaX
float m_DeltaX
Definition
dayzintroscenepc.c:11
DayZIntroScenePC::SetClickEnable
void SetClickEnable(bool enable)
Definition
dayzintroscenepc.c:47
DayZIntroScenePC::m_DiffX
float m_DiffX
Definition
dayzintroscenepc.c:10
DayZIntroScenePC::m_NewX
float m_NewX
Definition
dayzintroscenepc.c:15
DayZIntroScenePC::m_RotatingCharacter
bool m_RotatingCharacter
Definition
dayzintroscenepc.c:4
DayZIntroScenePC::IsRotatingCharacter
bool IsRotatingCharacter()
Definition
dayzintroscenepc.c:80
DayZIntroScenePC::m_Angle
float m_Angle
Definition
dayzintroscenepc.c:13
DayZIntroScenePC::SetInitPostprocesses
override void SetInitPostprocesses()
Definition
dayzintroscenepc.c:36
DayZIntroScenePC::m_EnableClick
bool m_EnableClick
Definition
dayzintroscenepc.c:3
DayZIntroScenePC::DayZIntroScenePC
void DayZIntroScenePC()
Definition
dayzintroscenepc.c:22
DayZIntroScenePC::m_BlurValue
float m_BlurValue
Definition
dayzintroscenepc.c:17
DayZIntroScenePC::m_RotatingCharacterRot
float m_RotatingCharacterRot
Definition
dayzintroscenepc.c:7
DayZIntroScenePC::CharacterRotate
void CharacterRotate()
Definition
dayzintroscenepc.c:86
DayZIntroScenePC::IsClickEnabled
bool IsClickEnabled()
Definition
dayzintroscenepc.c:53
DayZIntroScenePC::m_RotatingCharacterMouseX
int m_RotatingCharacterMouseX
Definition
dayzintroscenepc.c:5
DayZIntroScenePC::m_NewZ
float m_NewZ
Definition
dayzintroscenepc.c:16
DayZIntroScenePC::m_optmenu
ref OptionsMenu m_optmenu
Definition
dayzintroscenepc.c:19
DayZIntroScenePC::Update
void Update()
Definition
dayzintroscenepc.c:106
DayZIntroScenePC::m_Radius
float m_Radius
Definition
dayzintroscenepc.c:8
DayZIntroScenePC::m_Angle_offset
float m_Angle_offset
Definition
dayzintroscenepc.c:14
Math
Definition
enmath.c:7
Class::CastTo
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
Math::Pow
static proto float Pow(float v, float power)
Return power of v ^ power.
Math::AbsFloat
static proto float AbsFloat(float f)
Returns absolute value.
Math::Sqrt
static proto float Sqrt(float val)
Returns square root.
Math::Floor
static proto float Floor(float f)
Returns floor of value.
GetMousePos
proto void GetMousePos(out int x, out int y)
Games
Dayz
scripts
5_mission
dayzintroscenepc.c
Generated by
1.17.0