Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
weaponstartaction.c
Go to the documentation of this file.
1
4
class
WeaponStartAction
extends
WeaponStateBase
5
{
6
WeaponActions
m_action
;
7
int
m_actionType;
8
9
void
WeaponStartAction
(
Weapon_Base
w = NULL,
WeaponStateBase
parent = NULL,
WeaponActions
action =
WeaponActions
.NONE,
int
actionType = -1)
10
{
11
m_action
= action;
12
m_actionType = actionType;
13
}
14
15
override
void
OnEntry (
WeaponEventBase
e)
16
{
17
super.OnEntry(e);
18
if
(e)
19
{
20
if
(e.m_player)
21
{
22
HumanCommandWeapons
hcw = e.m_player.GetCommandModifier_Weapons();
23
if
(hcw)
24
{
25
HumanCommandAdditives
ad = e.m_player.GetCommandModifier_Additives();
26
if
(ad)
27
ad.CancelModifier();
28
29
hcw.StartAction(
m_action
, m_actionType);
30
31
if
(hcw.GetRunningAction() ==
m_action
&& hcw.GetRunningActionType() == m_actionType)
32
{
33
if
(
LogManager
.IsWeaponLogEnable()) {
wpnDebugPrint
(
"HCW: playing A="
+
typename
.EnumToString(
WeaponActions
,
m_action
) +
" AT="
+
WeaponActionTypeToString
(
m_action
, m_actionType) +
" fini="
+ hcw.IsActionFinished()); }
34
}
35
else
36
Error
(
"HCW: NOT playing A="
+
typename
.EnumToString(
WeaponActions
,
m_action
) +
" AT="
+
WeaponActionTypeToString
(
m_action
, m_actionType) +
" fini="
+ hcw.IsActionFinished());
37
}
38
else
39
if
(
LogManager
.IsWeaponLogEnable()) {
wpnDebugPrint
(
"---: remote playing A="
+
typename
.EnumToString(
WeaponActions
,
m_action
) +
" AT="
+
WeaponActionTypeToString
(
m_action
, m_actionType)); }
40
}
41
else
42
{
43
if
(
LogManager
.IsWeaponLogEnable()) {
wpnDebugPrint
(
"---: warning, no player wants to play A="
+
typename
.EnumToString(
WeaponActions
,
m_action
) +
" AT="
+
WeaponActionTypeToString
(
m_action
, m_actionType)); }
44
}
45
}
46
}
47
override
void
OnExit (
WeaponEventBase
e)
48
{
49
super.OnExit(e);
50
}
51
};
52
53
HumanCommandAdditives
class HumanCommandWeapons HumanCommandAdditives()
Definition:
human.c:1099
Error
void Error(string err)
Messagebox with error message.
Definition:
endebug.c:90
LogManager
Definition:
debug.c:734
WeaponActionTypeToString
string WeaponActionTypeToString(int A, int AT)
Definition:
human.c:936
wpnDebugPrint
void wpnDebugPrint(string s)
Definition:
debug.c:9
m_action
class WeaponEndAction extends WeaponStartAction m_action
WeaponStartAction
simple class starting animation action specified by m_action and m_actionType
Definition:
weaponchambering.c:2
WeaponActions
WeaponActions
actions
Definition:
human.c:808
HumanCommandWeapons
Definition:
human.c:986
WeaponEventBase
signalize mechanism manipulation
Definition:
events.c:34
WeaponStateBase
represent weapon state base
Definition:
bullethide.c:1
Weapon_Base
shorthand
Definition:
boltactionrifle_base.c:5
DAYZ
scripts_v1.24.157551
scripts
world
entities
firearms
fsm
states
weaponstartaction.c
Generated by
1.8.17