Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
rifleejectcasing.c
Go to the documentation of this file.
1 class RifleEjectCasing extends WeaponStateBase
2 {
4  int m_actionType;
5 
8  ref BulletHide_W4T m_hideB;
9 
10  void RifleEjectCasing (Weapon_Base w = NULL, WeaponStateBase parent = NULL, WeaponActions action = WeaponActions.NONE, int actionType = -1)
11  {
12  m_action = action;
13  m_actionType = actionType;
14 
15  // setup nested state machine
16  m_start = new WeaponStartAction(m_weapon, this, m_action, m_actionType);
17  m_eject = new WeaponEjectCasing(m_weapon, this);
18  m_hideB = new BulletHide_W4T(m_weapon, this);
19 
20  // events
21  WeaponEventBase __be_ = new WeaponEventAnimBulletEject;
22  WeaponEventBase __bh_ = new WeaponEventAnimBulletHide;
23  WeaponEventBase _fin_ = new WeaponEventHumanCommandActionFinished;
24 
25  m_fsm = new WeaponFSM(this); // @NOTE: set owner of the submachine fsm
26 
27  // transitions
28  m_fsm.AddTransition(new WeaponTransition(m_start, __be_, m_eject));
29  m_fsm.AddTransition(new WeaponTransition(m_eject, __bh_, m_hideB));
30  m_fsm.AddTransition(new WeaponTransition(m_hideB, _fin_, NULL));
31 
32  // Safety exits
33  m_fsm.AddTransition(new WeaponTransition(m_eject , _fin_, null));
34  m_fsm.AddTransition(new WeaponTransition(m_start , _fin_, null));
35 
36  m_fsm.SetInitialState(m_start);
37  }
38 };
39 
40 
41 
m_eject
ref WeaponEjectCasingMultiMuzzle m_eject
Definition: weaponchambering.c:638
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
m_start
ref WeaponStateBase m_start
Definition: weaponchambering.c:637
WeaponTransition
enum FSMTransition WeaponTransition
WeaponEventBase
signalize mechanism manipulation
Definition: events.c:34
WeaponStateBase
represent weapon state base
Definition: bullethide.c:1
m_weapon
class WeaponGuardIsDestroyed extends WeaponGuardBase m_weapon
Definition: guards.c:583
Weapon_Base
shorthand
Definition: boltactionrifle_base.c:5
WeaponFSM
weapon finite state machine
WeaponEjectCasing
Definition: weaponejectcasingandchamberfromattmag.c:126