DayZ
1.24
Loading...
Searching...
No Matches
TelescopicBaton.c
Go to the documentation of this file.
1
class
TelescopicBaton
:
ItemBase
2
{
3
protected
int
m_MeleeMode
;
4
protected
int
m_MeleeHeavyMode
;
5
protected
int
m_MeleeSprintMode
;
6
7
protected
ref
OpenableBehaviour
m_Openable
;
8
9
void
TelescopicBaton
()
10
{
12
m_MeleeMode
= 0;
13
m_MeleeHeavyMode
= 1;
14
m_MeleeSprintMode
= 2;
15
16
m_Openable
=
new
OpenableBehaviour
(
false
);
17
18
RegisterNetSyncVariableBool(
"m_Openable.m_IsOpened"
);
19
20
UpdateVisualState
();
21
}
22
23
override
void
Open
()
24
{
25
m_Openable
.Open();
26
SetSynchDirty();
27
29
m_MeleeMode
= 3;
30
m_MeleeHeavyMode
= 4;
31
m_MeleeSprintMode
= 5;
32
33
UpdateVisualState
();
34
}
35
36
override
void
Close
()
37
{
38
m_Openable
.Close();
39
SetSynchDirty();
40
42
m_MeleeMode
= 0;
43
m_MeleeHeavyMode
= 1;
44
m_MeleeSprintMode
= 2;
45
46
UpdateVisualState
();
47
}
48
49
override
bool
IsOpen
()
50
{
51
return
m_Openable
.IsOpened();
52
}
53
54
protected
void
UpdateVisualState
()
55
{
56
if
(
IsOpen
())
57
SetAnimationPhase(
"Doors1"
, 0.0);
58
else
59
SetAnimationPhase(
"Doors1"
, 1.0);
60
}
61
62
override
int
GetMeleeMode
()
63
{
64
return
m_MeleeMode
;
65
}
66
67
override
int
GetMeleeHeavyMode
()
68
{
69
return
m_MeleeHeavyMode
;
70
}
71
72
override
int
GetMeleeSprintMode
()
73
{
74
return
m_MeleeSprintMode
;
75
}
76
77
override
void
OnVariablesSynchronized
()
78
{
79
super
.OnVariablesSynchronized();
80
81
UpdateVisualState
();
82
}
83
84
override
void
SetActions
()
85
{
86
super
.SetActions();
87
AddAction
(
ActionOpen
);
88
AddAction
(
ActionClose
);
89
}
90
}
AddAction
void AddAction(typename actionName)
Definition
AdvancedCommunication.c:212
ActionClose
Definition
ActionClose.c:2
ActionOpen
Definition
ActionOpen.c:2
ItemBase
Definition
InventoryItem.c:697
OpenableBehaviour
Definition
OpenableBehaviour.c:2
Param3
Definition
EntityAI.c:95
TelescopicBaton
Definition
TelescopicBaton.c:2
TelescopicBaton::m_MeleeMode
int m_MeleeMode
Definition
TelescopicBaton.c:3
TelescopicBaton::Close
override void Close()
Definition
TelescopicBaton.c:36
TelescopicBaton::OnVariablesSynchronized
override void OnVariablesSynchronized()
Definition
TelescopicBaton.c:77
TelescopicBaton::UpdateVisualState
void UpdateVisualState()
Definition
TelescopicBaton.c:54
TelescopicBaton::m_MeleeSprintMode
int m_MeleeSprintMode
Definition
TelescopicBaton.c:5
TelescopicBaton::SetActions
override void SetActions()
Definition
TelescopicBaton.c:84
TelescopicBaton::m_MeleeHeavyMode
int m_MeleeHeavyMode
Definition
TelescopicBaton.c:4
TelescopicBaton::m_Openable
ref OpenableBehaviour m_Openable
Definition
TelescopicBaton.c:7
TelescopicBaton::GetMeleeMode
override int GetMeleeMode()
Definition
TelescopicBaton.c:62
TelescopicBaton::IsOpen
override bool IsOpen()
Definition
TelescopicBaton.c:49
TelescopicBaton::TelescopicBaton
void TelescopicBaton()
Definition
TelescopicBaton.c:9
TelescopicBaton::GetMeleeHeavyMode
override int GetMeleeHeavyMode()
Definition
TelescopicBaton.c:67
TelescopicBaton::GetMeleeSprintMode
override int GetMeleeSprintMode()
Definition
TelescopicBaton.c:72
TelescopicBaton::Open
override void Open()
Definition
TelescopicBaton.c:23
scripts
4_World
Entities
ItemBase
TelescopicBaton.c
Generated by
1.10.0