Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
rifle_base.c
Go to the documentation of this file.
1
enum
DefaultAnimState
2
{
3
DEFAULT
= 0,
4
};
5
10
class
Rifle_Base
extends
Weapon_Base
11
{
12
void
Rifle_Base
()
13
{
14
}
15
16
override
void
InitStateMachine
()
17
{
18
m_abilities.Insert(
new
AbilityRecord
(
WeaponActions
.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED));
19
20
// setup state machine
21
// basic weapon states
22
WeaponStableState
E
=
new
WeaponStableState
(
this
, NULL,
DefaultAnimState
.DEFAULT);
23
24
WeaponStateBase
Mech =
new
WeaponCharging
(
this
, NULL,
WeaponActions
.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED);
25
26
// events
27
WeaponEventBase
__M__ =
new
WeaponEventMechanism;
28
WeaponEventBase
_fin_ =
new
WeaponEventHumanCommandActionFinished;
29
WeaponEventBase
_abt_ =
new
WeaponEventHumanCommandActionAborted;
30
31
m_fsm =
new
WeaponFSM
();
32
// charging
33
m_fsm.AddTransition(
new
WeaponTransition
(
E
, __M__, Mech));
34
m_fsm.AddTransition(
new
WeaponTransition
(Mech , _fin_,
E
));
35
m_fsm.AddTransition(
new
WeaponTransition
(Mech , _abt_,
E
));
36
37
SetInitialState(
E
);
38
39
SelectionBulletHide();
40
41
m_fsm.Start();
42
}
43
44
};
45
46
AbilityRecord
pair ( action, actionType )
Definition
weapon_base.c:5
Rifle_Base
base for rifles @NOTE name copies config base class
Definition
sks.c:70
Weapon_Base
shorthand
Definition
boltactionrifle_base.c:6
Weapon_Base::InitStateMachine
override void InitStateMachine()
Definition
rifle_base.c:16
Weapon_Base::Rifle_Base
void Rifle_Base()
Definition
rifle_base.c:12
WeaponCharging
charging of weapon without ammo to be chambered
WeaponEventBase
signalize mechanism manipulation
Definition
events.c:35
WeaponFSM
weapon finite state machine
WeaponStableState
represents weapon's stable state (i.e.
Definition
crossbow.c:27
WeaponStateBase
represent weapon state base
Definition
bullethide.c:2
DEFAULT
@ DEFAULT
Definition
debugtextflags.c:9
WeaponActions
WeaponActions
actions
Definition
human.c:816
DefaultAnimState
DefaultAnimState
Definition
rifle_base.c:2
WeaponTransition
enum FSMTransition WeaponTransition
E
@ E
EMPTY.
Definition
weaponstablestate.c:19
WeaponStableState
void WeaponStableState(Weapon_Base w=NULL, WeaponStateBase parent=NULL, int anim_state=-1)
Definition
weaponstablestate.c:32
Games
Dayz
scripts
4_world
entities
firearms
rifle_base.c
Generated by
1.17.0