DayZ 1.24
Loading...
Searching...
No Matches
RifleEjectCasing.c
Go to the documentation of this file.
1class RifleEjectCasing extends WeaponStateBase
2{
4 int m_actionType;
5
9
11 {
13 m_actionType = actionType;
14
15 // setup nested state machine
16 m_start = new WeaponStartAction(m_weapon, this, m_action, m_actionType);
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
class WeaponGuardIsDestroyed extends WeaponGuardBase m_weapon
Definition Guards.c:602
enum FSMTransition WeaponTransition
ref WeaponStateBase m_start
class WeaponEndAction extends WeaponStartAction m_action
ref WeaponEjectCasingMultiMuzzle m_eject
signalize mechanism manipulation
Definition Events.c:35
weapon finite state machine
simple class starting animation action specified by m_action and m_actionType
represent weapon state base
Definition BulletHide.c:2
ref BulletHide_W4T m_hideB
int m_actionType
action to be played
void WeaponStartAction(Weapon_Base w=NULL, WeaponStateBase parent=NULL, WeaponActions action=WeaponActions.NONE, int actionType=-1)
specific action sub-type
WeaponActions m_action
ref WeaponStartAction m_start
ref WeaponEjectCasing m_eject
void RifleEjectCasing(Weapon_Base w=NULL, WeaponStateBase parent=NULL, WeaponActions action=WeaponActions.NONE, int actionType=-1)
void WeaponEjectCasing(Weapon_Base w=NULL, WeaponStateBase parent=NULL)
WeaponActions
actions
Definition human.c:796