Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
handstartaction.c
Go to the documentation of this file.
1
4
class
HandStartAction
extends
HandStateBase
5
{
6
WeaponActions
m_Action
;
7
int
m_ActionType
;
8
9
void
HandStartAction
(Man player = NULL,
HandStateBase
parent = NULL,
WeaponActions
action =
WeaponActions
.NONE,
int
actionType = -1)
10
{
11
m_Action
= action;
12
m_ActionType
= actionType;
13
}
14
15
override
void
OnEntry
(
HandEventBase
e)
16
{
17
super.OnEntry(e);
18
19
if
(e.m_Player)
20
{
21
HumanCommandWeapons
hcw = e.m_Player.GetCommandModifier_Weapons();
22
if
(hcw)
23
{
24
if
(
m_ActionType
== -1)
25
{
26
hcw.
StartAction
(-1, -1);
27
if
(
LogManager
.
IsInventoryHFSMLogEnable
())
hndDebugPrint
(
"HCW: "
+
Object
.GetDebugName(e.m_Player) +
" STS = "
+ e.m_Player.GetSimulationTimeStamp() +
" playing A=-1 AT=-1 fini="
+ hcw.
IsActionFinished
());
28
}
29
else
30
{
31
hcw.
StartAction
(
m_Action
,
m_ActionType
);
32
33
if
(hcw.
GetRunningAction
() ==
m_Action
&& hcw.
GetRunningActionType
() ==
m_ActionType
)
34
{
35
if
(
LogManager
.
IsInventoryHFSMLogEnable
())
hndDebugPrint
(
"HCW: "
+
Object
.GetDebugName(e.m_Player) +
" STS = "
+ e.m_Player.GetSimulationTimeStamp() +
" playing A="
+
typename
.EnumToString(
WeaponActions
,
m_Action
) +
" AT="
+
WeaponActionTypeToString
(
m_Action
,
m_ActionType
) +
" fini="
+ hcw.
IsActionFinished
());
36
}
37
else
38
Error
(
"HCW: NOT playing A="
+
typename
.EnumToString(
WeaponActions
,
m_Action
) +
" AT="
+
WeaponActionTypeToString
(
m_Action
,
m_ActionType
) +
" fini="
+ hcw.
IsActionFinished
());
39
}
40
}
41
else
42
if
(
LogManager
.
IsInventoryHFSMLogEnable
())
hndDebugPrint
(
"---: remote playing A="
+
typename
.EnumToString(
WeaponActions
,
m_Action
) +
" AT="
+
WeaponActionTypeToString
(
m_Action
,
m_ActionType
));
43
}
44
else
45
{
46
if
(
LogManager
.
IsInventoryHFSMLogEnable
())
hndDebugPrint
(
"---: warning, no player wants to play A="
+
typename
.EnumToString(
WeaponActions
,
m_Action
) +
" AT="
+
WeaponActionTypeToString
(
m_Action
,
m_ActionType
));
47
}
48
}
49
override
void
OnExit
(
HandEventBase
e)
50
{
51
super.OnExit(e);
52
}
53
54
override
bool
IsIdle
() {
return
false
; }
55
};
56
57
58
HandEventBase
Abstracted event, not to be used, only inherited.
Definition
hand_events.c:212
HandStartAction
simple class starting animation action specified by m_action and m_actionType
Definition
handanimatedforceswapping.c:77
HandStateBase
represent hand state base
Definition
handanimatedforceswapping.c:4
HandStateBase::m_ActionType
int m_ActionType
action to be played
Definition
handstartaction.c:7
HandStateBase::OnEntry
override void OnEntry(HandEventBase e)
Definition
handstartaction.c:15
HandStateBase::HandStateBase
void HandStateBase(Man player=NULL, HandStateBase parent=NULL)
nested state machine (or null)
Definition
handstatebase.c:11
HandStateBase::IsIdle
override bool IsIdle()
Definition
handstartaction.c:54
HandStateBase::OnExit
override void OnExit(HandEventBase e)
Definition
handstartaction.c:49
HandStateBase::m_Action
WeaponActions m_Action
Definition
handstartaction.c:6
HandStateBase::HandStartAction
void HandStartAction(Man player=NULL, HandStateBase parent=NULL, WeaponActions action=WeaponActions.NONE, int actionType=-1)
specific action sub-type
Definition
handstartaction.c:9
HumanCommandWeapons
Definition
human.c:1000
HumanCommandWeapons::GetRunningAction
proto native int GetRunningAction()
returns -1 when no action is running or RELOAD,MECHANISM, ....
HumanCommandWeapons::IsActionFinished
proto native bool IsActionFinished()
HumanCommandWeapons::StartAction
proto native bool StartAction(WeaponActions pAction, int pActionType)
start reload,mechanism,chambering,unjam ...
HumanCommandWeapons::GetRunningActionType
proto native int GetRunningActionType()
returns -1 when no action is running or appropriate action type
LogManager
Definition
debug.c:692
LogManager::IsInventoryHFSMLogEnable
static bool IsInventoryHFSMLogEnable()
Definition
debug.c:766
Object
Definition
objecttyped.c:2
Error
void Error(string err)
Messagebox with error message.
Definition
endebug.c:90
hndDebugPrint
void hndDebugPrint(string s)
Definition
handfsm.c:1
WeaponActions
WeaponActions
actions
Definition
human.c:816
WeaponActionTypeToString
string WeaponActionTypeToString(int A, int AT)
Definition
human.c:949
Games
Dayz
scripts
3_game
systems
inventory
handstartaction.c
Generated by
1.17.0