DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
WeaponStartAction.c
См. документацию.
1
5{
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
30
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
void wpnDebugPrint(string s)
Определения Debug.c:9
class WeaponEndAction extends WeaponStartAction m_action
proto native bool IsActionFinished()
proto native int GetRunningAction()
returns -1 when no action is running or RELOAD,MECHANISM, ....
proto native bool StartAction(WeaponActions pAction, int pActionType)
start reload,mechanism,chambering,unjam ...
proto native int GetRunningActionType()
returns -1 when no action is running or appropriate action type
Определения human.c:994
static bool IsWeaponLogEnable()
Определения Debug.c:718
Определения Debug.c:594
shorthand
Определения BoltActionRifle_Base.c:6
DayZPlayer m_player
Определения Events.c:37
signalize mechanism manipulation
Определения Events.c:35
simple class starting animation action specified by m_action and m_actionType
Определения WeaponChambering.c:3
int m_actionType
action to be played
Определения RifleChambering.c:4
void WeaponStateBase(Weapon_Base w=NULL, WeaponStateBase parent=NULL)
internal state id used for load/restore
Определения WeaponStateBase.c:17
void WeaponStartAction(Weapon_Base w=NULL, WeaponStateBase parent=NULL, WeaponActions action=WeaponActions.NONE, int actionType=-1)
specific action sub-type
Определения WeaponStartAction.c:9
WeaponActions m_action
Определения RifleChambering.c:3
override void OnEntry(WeaponEventBase e)
Определения WeaponStartAction.c:15
override void OnExit(WeaponEventBase e)
Определения WeaponStartAction.c:47
represent weapon state base
Определения BulletHide.c:2
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90
WeaponActions
actions
Определения human.c:816
string WeaponActionTypeToString(int A, int AT)
Определения human.c:943
class HumanCommandWeapons HumanCommandAdditives()
Определения human.c:1112