DayZ
1.24
Loading...
Searching...
No Matches
SKS.c
Go to the documentation of this file.
1
enum
SKSAnimState
2
{
3
DEFAULT
= 0,
4
OPENED
= 1,
5
JAMMED
= 2,
6
};
7
8
enum
SKSStableStateID
9
{
10
UNKNOWN
= 0,
11
SKS_CLO_BU0
= 1,
12
SKS_CLO_BU1
= 2,
13
SKS_OPN_BU0
= 3,
14
SKS_JAM_BU1
= 4
15
}
16
17
class
SKS_CLO_BU0
extends
WeaponStableState
18
{
19
override
void
OnEntry
(
WeaponEventBase
e
) {
if
(
LogManager
.
IsWeaponLogEnable
())
wpnPrint
(
"[wpnfsm] "
+
Object
.GetDebugName(
m_weapon
) +
" { close nobull"
);
super
.OnEntry(
e
); }
20
override
void
OnExit
(
WeaponEventBase
e
) {
super
.OnExit(
e
);
if
(
LogManager
.
IsWeaponLogEnable
())
wpnPrint
(
"[wpnfsm] "
+
Object
.GetDebugName(
m_weapon
) +
" } close nobull"
); }
21
override
int
GetCurrentStateID
() {
return
SKSStableStateID
.SKS_CLO_BU0; }
22
override
bool
HasBullet
() {
return
false
; }
23
override
bool
HasMagazine
() {
return
false
; }
24
override
bool
IsJammed
() {
return
false
; }
25
override
bool
IsRepairEnabled
() {
return
true
; }
26
override
void
InitMuzzleArray
() {
m_muzzleHasBullet
= {
MuzzleState
.E}; }
27
28
};
29
class
SKS_CLO_BU1
extends
WeaponStableState
30
{
31
override
void
OnEntry
(
WeaponEventBase
e
) {
if
(
LogManager
.
IsWeaponLogEnable
())
wpnPrint
(
"[wpnfsm] "
+
Object
.GetDebugName(
m_weapon
) +
" { close bullet"
);
super
.OnEntry(
e
); }
32
override
void
OnExit
(
WeaponEventBase
e
) {
super
.OnExit(
e
);
if
(
LogManager
.
IsWeaponLogEnable
())
wpnPrint
(
"[wpnfsm] "
+
Object
.GetDebugName(
m_weapon
) +
" } close bullet"
); }
33
override
int
GetCurrentStateID
() {
return
SKSStableStateID
.SKS_CLO_BU1; }
34
override
bool
HasBullet
() {
return
true
; }
35
override
bool
HasMagazine
() {
return
false
; }
36
override
bool
IsJammed
() {
return
false
; }
37
override
bool
IsRepairEnabled
() {
return
true
; }
38
override
void
InitMuzzleArray
() {
m_muzzleHasBullet
= {
MuzzleState
.L}; }
39
};
40
class
SKS_OPN_BU0
extends
WeaponStableState
41
{
42
override
void
OnEntry
(
WeaponEventBase
e
) {
if
(
LogManager
.
IsWeaponLogEnable
())
wpnPrint
(
"[wpnfsm] "
+
Object
.GetDebugName(
m_weapon
) +
" { open nobull"
);
m_weapon
.SetWeaponOpen(
true
);
super
.OnEntry(
e
); }
43
override
void
OnExit
(
WeaponEventBase
e
) {
super
.OnExit(
e
);
if
(
LogManager
.
IsWeaponLogEnable
())
wpnPrint
(
"[wpnfsm] "
+
Object
.GetDebugName(
m_weapon
) +
" } open nobull"
); }
44
override
int
GetCurrentStateID
() {
return
SKSStableStateID
.SKS_OPN_BU0; }
45
override
bool
HasBullet
() {
return
false
; }
46
override
bool
HasMagazine
() {
return
false
; }
47
override
bool
IsJammed
() {
return
false
; }
48
override
bool
IsBoltOpen
() {
return
true
; }
49
override
bool
IsRepairEnabled
() {
return
true
; }
50
override
void
InitMuzzleArray
() {
m_muzzleHasBullet
= {
MuzzleState
.E}; }
51
};
52
class
SKS_JAM_BU1
extends
WeaponStateJammed
53
{
54
override
void
OnEntry
(
WeaponEventBase
e
) {
if
(
LogManager
.
IsWeaponLogEnable
())
wpnPrint
(
"[wpnfsm] "
+
Object
.GetDebugName(
m_weapon
) +
" { jammed bullet"
);
super
.OnEntry(
e
); }
55
override
void
OnExit
(
WeaponEventBase
e
) {
super
.OnExit(
e
);
if
(
LogManager
.
IsWeaponLogEnable
())
wpnPrint
(
"[wpnfsm] "
+
Object
.GetDebugName(
m_weapon
) +
" } jammed bullet"
); }
56
override
int
GetCurrentStateID
() {
return
SKSStableStateID
.SKS_JAM_BU1; }
57
override
bool
HasBullet
() {
return
true
; }
58
override
bool
HasMagazine
() {
return
false
; }
59
override
bool
IsJammed
() {
return
true
; }
60
override
bool
IsBoltOpen
() {
return
true
; }
61
override
bool
IsRepairEnabled
() {
return
true
; }
62
override
void
InitMuzzleArray
() {
m_muzzleHasBullet
= {
MuzzleState
.F}; }
63
};
64
69
class
SKS_Base
extends
Rifle_Base
70
{
71
ref
WeaponStableState
C0
;
72
ref
WeaponStableState
C1
;
73
ref
WeaponStableState
L0
;
74
ref
WeaponStableState
JF
;
75
76
override
RecoilBase
SpawnRecoilObject
()
77
{
78
return
new
SKSRecoil
(
this
);
79
}
80
81
override
void
InitStateMachine
()
82
{
83
m_abilities.Insert(
new
AbilityRecord
(
WeaponActions
.CHAMBERING,
WeaponActionChamberingTypes
.CHAMBERING_STARTLOOPABLE_CLOSED_KEEP));
84
m_abilities.Insert(
new
AbilityRecord
(
WeaponActions
.CHAMBERING,
WeaponActionChamberingTypes
.CHAMBERING_STARTLOOPABLE_CLOSED));
85
m_abilities.Insert(
new
AbilityRecord
(
WeaponActions
.CHAMBERING,
WeaponActionChamberingTypes
.CHAMBERING_STARTLOOPABLE_OPENED));
86
m_abilities.Insert(
new
AbilityRecord
(
WeaponActions
.CHAMBERING,
WeaponActionChamberingTypes
.CHAMBERING_ENDLOOPABLE));
87
88
m_abilities.Insert(
new
AbilityRecord
(
WeaponActions
.RELOAD_CLIP, 0));
89
90
m_abilities.Insert(
new
AbilityRecord
(
WeaponActions
.MECHANISM, GetWeaponSpecificCommand(
WeaponActions
.MECHANISM,
WeaponActionMechanismTypes
.MECHANISM_CLOSED)));
91
m_abilities.Insert(
new
AbilityRecord
(
WeaponActions
.MECHANISM, GetWeaponSpecificCommand(
WeaponActions
.MECHANISM,
WeaponActionMechanismTypes
.MECHANISM_OPENED)));
//????
92
93
m_abilities.Insert(
new
AbilityRecord
(
WeaponActions
.UNJAMMING, GetWeaponSpecificCommand(
WeaponActions
.UNJAMMING,
WeaponActionUnjammingTypes
.UNJAMMING_START)));
94
m_abilities.Insert(
new
AbilityRecord
(
WeaponActions
.UNJAMMING, GetWeaponSpecificCommand(
WeaponActions
.UNJAMMING,
WeaponActionUnjammingTypes
.UNJAMMING_END)));
95
96
m_abilities.Insert(
new
AbilityRecord
(
WeaponActions
.FIRE, GetWeaponSpecificCommand(
WeaponActions
.FIRE,
WeaponActionFireTypes
.FIRE_NORMAL)));
97
m_abilities.Insert(
new
AbilityRecord
(
WeaponActions
.FIRE, GetWeaponSpecificCommand(
WeaponActions
.FIRE,
WeaponActionFireTypes
.FIRE_LAST)));
98
m_abilities.Insert(
new
AbilityRecord
(
WeaponActions
.FIRE, GetWeaponSpecificCommand(
WeaponActions
.FIRE,
WeaponActionFireTypes
.FIRE_JAM)));
99
m_abilities.Insert(
new
AbilityRecord
(
WeaponActions
.FIRE, GetWeaponSpecificCommand(
WeaponActions
.FIRE,
WeaponActionFireTypes
.FIRE_DRY)));
100
101
//m_abilities.Insert(new AbilityRecord(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_UNCOCKED));
102
103
// setup state machine
104
// basic weapon states
105
// close-locked-jammed | nobullet-bullet | nomag-mag
106
// regexp: [CLJ][01][01]
107
C0 =
new
SKS_CLO_BU0
(
this
,
NULL
,
SKSAnimState
.DEFAULT);
108
C1 =
new
SKS_CLO_BU1
(
this
,
NULL
,
SKSAnimState
.DEFAULT);
109
L0 =
new
SKS_OPN_BU0
(
this
,
NULL
,
SKSAnimState
.OPENED);
110
JF =
new
SKS_JAM_BU1
(
this
,
NULL
,
SKSAnimState
.JAMMED);
111
112
// unstable (intermediate) states
113
WeaponChargingInnerMag
Mech_C0
=
new
WeaponChargingInnerMag(
this
,
NULL
,
WeaponActions
.MECHANISM, GetWeaponSpecificCommand(
WeaponActions
.MECHANISM,
WeaponActionMechanismTypes
.MECHANISM_CLOSED));
114
WeaponChargingInnerMag
Mech_L0
=
new
WeaponChargingInnerMag(
this
,
NULL
,
WeaponActions
.MECHANISM, GetWeaponSpecificCommand(
WeaponActions
.MECHANISM,
WeaponActionMechanismTypes
.MECHANISM_OPENED));
115
WeaponChargingInnerMag
Mech_C1
=
new
WeaponChargingInnerMag(
this
,
NULL
,
WeaponActions
.MECHANISM, GetWeaponSpecificCommand(
WeaponActions
.MECHANISM,
WeaponActionMechanismTypes
.MECHANISM_CLOSED));
116
117
//Fire
118
WeaponStateBase
Trigger_C0
=
new
WeaponDryFire
(
this
,
NULL
,
WeaponActions
.FIRE, GetWeaponSpecificCommand(
WeaponActions
.FIRE,
WeaponActionFireTypes
.FIRE_DRY));
// cock without clip
119
WeaponFireAndChamberFromInnerMagazine
Trigger_C1
=
new
WeaponFireAndChamberFromInnerMagazine
(
this
,
NULL
,
WeaponActions
.FIRE, GetWeaponSpecificCommand(
WeaponActions
.FIRE,
WeaponActionFireTypes
.FIRE_NORMAL));
120
WeaponStateBase
Trigger_C1L
=
new
WeaponFireLast(
this
,
NULL
,
WeaponActions
.FIRE, GetWeaponSpecificCommand(
WeaponActions
.FIRE,
WeaponActionFireTypes
.FIRE_LAST));
121
WeaponStateBase
Trigger_L0
=
new
WeaponDryFire
(
this
,
NULL
,
WeaponActions
.FIRE, GetWeaponSpecificCommand(
WeaponActions
.FIRE,
WeaponActionFireTypes
.FIRE_DRY));
122
WeaponStateBase
Trigger_JF
=
new
WeaponDryFire
(
this
,
NULL
,
WeaponActions
.FIRE, GetWeaponSpecificCommand(
WeaponActions
.FIRE,
WeaponActionFireTypes
.FIRE_DRY));
123
124
WeaponStateBase
Trigger_C1J
=
new
WeaponFireToJam
(
this
,
NULL
,
WeaponActions
.FIRE,
WeaponActionFireTypes
.FIRE_JAM);
125
126
//Unjam
127
WeaponStateBase
Unjam_JF
=
new
WeaponUnjamming
(
this
,
NULL
,
WeaponActions
.UNJAMMING, GetWeaponSpecificCommand(
WeaponActions
.UNJAMMING,
WeaponActionUnjammingTypes
.UNJAMMING_START));
128
129
//Chambering
130
LoopedChambering
Chamber_C0
=
new
LoopedChambering(
this
,
NULL
,
WeaponActions
.CHAMBERING,
WeaponActionChamberingTypes
.CHAMBERING_STARTLOOPABLE_CLOSED,
WeaponActionChamberingTypes
.CHAMBERING_ENDLOOPABLE);
131
LoopedChambering
Chamber_C1
=
new
LoopedChambering(
this
,
NULL
,
WeaponActions
.CHAMBERING,
WeaponActionChamberingTypes
.CHAMBERING_STARTLOOPABLE_CLOSED_KEEP,
WeaponActionChamberingTypes
.CHAMBERING_ENDLOOPABLE);
132
LoopedChambering
Chamber_L0
=
new
LoopedChambering(
this
,
NULL
,
WeaponActions
.CHAMBERING,
WeaponActionChamberingTypes
.CHAMBERING_STARTLOOPABLE_OPENED,
WeaponActionChamberingTypes
.CHAMBERING_ENDLOOPABLE);
133
134
//WeaponStateBase chmMag = new WeaponChamberFromAttMag(this, NULL, WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED);
135
136
// events
137
WeaponEventBase
__M__
=
new
WeaponEventMechanism;
138
WeaponEventBase
__T__
=
new
WeaponEventTrigger;
139
WeaponEventBase
__TJ_
=
new
WeaponEventTriggerToJam;
140
WeaponEventBase
__U__
=
new
WeaponEventUnjam;
141
WeaponEventBase
__L__
=
new
WeaponEventLoad1Bullet;
142
WeaponEventBase
_fin_
=
new
WeaponEventHumanCommandActionFinished;
143
WeaponEventBase
_abt_
=
new
WeaponEventHumanCommandActionAborted;
144
WeaponEventBase
_rto_
=
new
WeaponEventReloadTimeout;
145
WeaponEventBase
_dto_
=
new
WeaponEventDryFireTimeout;
146
147
m_fsm =
new
WeaponFSM
();
148
149
// order: Discharged-Charged | nobullet-bullet | nomag-mag
150
// charging
151
m_fsm.AddTransition(
new
WeaponTransition
(C0,
__M__
,
Mech_C1
));
// charge from dischg nobullet nomag
152
153
m_fsm.AddTransition(
new
WeaponTransition
(C1,
__M__
,
Mech_C1
));
// charge from bullet nomag
154
m_fsm.AddTransition(
new
WeaponTransition
(
Mech_C1
,
_fin_
, C0,
NULL
,
new
WeaponGuardCurrentChamberEmpty(
this
)));
155
m_fsm.AddTransition(
new
WeaponTransition
(
Mech_C1
,
_fin_
, C1));
156
m_fsm.AddTransition(
new
WeaponTransition
(
Mech_C1
,
_abt_
, C0,
NULL
,
new
WeaponGuardCurrentChamberEmpty(
this
)));
157
m_fsm.AddTransition(
new
WeaponTransition
(
Mech_C1
,
_abt_
, C1));
158
159
m_fsm.AddTransition(
new
WeaponTransition
(L0,
__M__
,
Mech_L0
));
// charge from dischg nobullet nomag
160
m_fsm.AddTransition(
new
WeaponTransition
(
Mech_L0
,
_fin_
, L0,
NULL
,
new
WeaponGuardWeaponOpen
(
this
)));
161
m_fsm.AddTransition(
new
WeaponTransition
(
Mech_L0
,
_fin_
, C0,
NULL
,
new
WeaponGuardCurrentChamberEmpty(
this
)));
162
m_fsm.AddTransition(
new
WeaponTransition
(
Mech_L0
,
_fin_
, C1));
163
m_fsm.AddTransition(
new
WeaponTransition
(
Mech_L0
,
_abt_
, L0,
NULL
,
new
WeaponGuardWeaponOpen
(
this
)));
164
m_fsm.AddTransition(
new
WeaponTransition
(
Mech_L0
,
_abt_
, C0,
NULL
,
new
WeaponGuardCurrentChamberEmpty(
this
)));
165
m_fsm.AddTransition(
new
WeaponTransition
(
Mech_L0
,
_abt_
, C1));
166
167
168
/*m_start = new WeaponCharging_Start(m_weapon, this, m_action, m_actionType);
169
m_onBE = new WeaponEjectBullet_Cartridge_W4T(m_weapon, this);
170
m_onBEFireOut = new WeaponEjectCasing_W4T(m_weapon, this);
171
m_hideB = new BulletHide_W4T(m_weapon, this);
172
m_onCK = new WeaponCharging_CK(m_weapon, this);
173
m_chamber = new WeaponChamberFromInnerMag_W4T(m_weapon, this);*/
174
175
176
// fire
177
m_fsm.AddTransition(
new
WeaponTransition
(C0,
__T__
,
Trigger_C0
));
178
m_fsm.AddTransition(
new
WeaponTransition
(
Trigger_C0
,
_fin_
, C0));
179
m_fsm.AddTransition(
new
WeaponTransition
(
Trigger_C0
,
_dto_
, C0));
180
m_fsm.AddTransition(
new
WeaponTransition
(
Trigger_C0
,
_abt_
, C0));
181
182
183
m_fsm.AddTransition(
new
WeaponTransition
(C1,
__T__
,
Trigger_C1
,
NULL
,
new
WeaponGuardHasAmmoInnerMagazine(
this
)));
184
m_fsm.AddTransition(
new
WeaponTransition
(
Trigger_C1
,
_fin_
, C1));
185
m_fsm.AddTransition(
new
WeaponTransition
(
Trigger_C1
,
_rto_
, C1));
186
m_fsm.AddTransition(
new
WeaponTransition
(
Trigger_C1
,
_abt_
, C1));
187
188
m_fsm.AddTransition(
new
WeaponTransition
(C1,
__T__
,
Trigger_C1L
));
189
m_fsm.AddTransition(
new
WeaponTransition
(
Trigger_C1L
,
_fin_
, L0));
190
m_fsm.AddTransition(
new
WeaponTransition
(
Trigger_C1L
,
_rto_
, L0));
191
m_fsm.AddTransition(
new
WeaponTransition
(
Trigger_C1L
,
_abt_
, L0));
192
193
m_fsm.AddTransition(
new
WeaponTransition
(C1,
__TJ_
,
Trigger_C1J
));
194
m_fsm.AddTransition(
new
WeaponTransition
(
Trigger_C1J
,
_fin_
, JF));
195
m_fsm.AddTransition(
new
WeaponTransition
(
Trigger_C1J
,
_rto_
, JF));
196
m_fsm.AddTransition(
new
WeaponTransition
(
Trigger_C1J
,
_abt_
, JF));
197
198
m_fsm.AddTransition(
new
WeaponTransition
(L0,
__T__
,
Trigger_L0
));
199
m_fsm.AddTransition(
new
WeaponTransition
(
Trigger_L0
,
_fin_
, L0));
200
m_fsm.AddTransition(
new
WeaponTransition
(
Trigger_L0
,
_dto_
, L0));
201
m_fsm.AddTransition(
new
WeaponTransition
(
Trigger_L0
,
_abt_
, L0));
202
203
m_fsm.AddTransition(
new
WeaponTransition
(JF,
__T__
,
Trigger_JF
));
// opened fire.uncocked w mag
204
m_fsm.AddTransition(
new
WeaponTransition
(
Trigger_JF
,
_fin_
, JF));
205
m_fsm.AddTransition(
new
WeaponTransition
(
Trigger_JF
,
_dto_
, JF));
206
m_fsm.AddTransition(
new
WeaponTransition
(
Trigger_JF
,
_abt_
, JF));
207
208
209
// load cartridge
210
m_fsm.AddTransition(
new
WeaponTransition
(C0,
__L__
,
Chamber_C0
));
211
m_fsm.AddTransition(
new
WeaponTransition
(
Chamber_C0
,
_fin_
, L0,
NULL
,
new
WeaponGuardWeaponOpen
(
this
)));
212
m_fsm.AddTransition(
new
WeaponTransition
(
Chamber_C0
,
_fin_
, C0,
NULL
,
new
WeaponGuardCurrentChamberEmpty(
this
)));
213
m_fsm.AddTransition(
new
WeaponTransition
(
Chamber_C0
,
_fin_
, C1));
214
m_fsm.AddTransition(
new
WeaponTransition
(
Chamber_C0
,
_abt_
, L0,
NULL
,
new
WeaponGuardWeaponOpen
(
this
)));
215
m_fsm.AddTransition(
new
WeaponTransition
(
Chamber_C0
,
_abt_
, C0,
NULL
,
new
WeaponGuardCurrentChamberEmpty(
this
)));
216
m_fsm.AddTransition(
new
WeaponTransition
(
Chamber_C0
,
_abt_
, C1));
217
218
m_fsm.AddTransition(
new
WeaponTransition
(C1,
__L__
,
Chamber_C1
,
NULL
,
new
GuardNot(
new
WeaponGuardInnerMagazineFullShareChamber(
this
))));
219
m_fsm.AddTransition(
new
WeaponTransition
(
Chamber_C1
,
_fin_
, C1));
220
m_fsm.AddTransition(
new
WeaponTransition
(
Chamber_C1
,
_abt_
, C1));
221
222
m_fsm.AddTransition(
new
WeaponTransition
(L0,
__L__
,
Chamber_L0
,
NULL
,
new
GuardNot(
new
WeaponGuardInnerMagazineFullShareChamber(
this
))));
223
m_fsm.AddTransition(
new
WeaponTransition
(
Chamber_L0
,
_fin_
, L0,
NULL
,
new
WeaponGuardWeaponOpen
(
this
)));
224
m_fsm.AddTransition(
new
WeaponTransition
(
Chamber_L0
,
_fin_
, C0,
NULL
,
new
WeaponGuardCurrentChamberEmpty(
this
)));
225
m_fsm.AddTransition(
new
WeaponTransition
(
Chamber_L0
,
_fin_
, C1));
226
m_fsm.AddTransition(
new
WeaponTransition
(
Chamber_L0
,
_abt_
, L0,
NULL
,
new
WeaponGuardWeaponOpen
(
this
)));
227
m_fsm.AddTransition(
new
WeaponTransition
(
Chamber_L0
,
_abt_
, C0,
NULL
,
new
WeaponGuardCurrentChamberEmpty(
this
)));
228
m_fsm.AddTransition(
new
WeaponTransition
(
Chamber_L0
,
_abt_
, C1));
229
230
231
// unjam
232
m_fsm.AddTransition(
new
WeaponTransition
(JF,
__U__
,
Unjam_JF
));
// unjam nomag
233
m_fsm.AddTransition(
new
WeaponTransition
(
Unjam_JF
,
_fin_
, JF,
NULL
,
new
WeaponGuardJammed(
this
)));
234
m_fsm.AddTransition(
new
WeaponTransition
(
Unjam_JF
,
_fin_
, C0,
NULL
,
new
WeaponGuardCurrentChamberEmpty(
this
)));
235
m_fsm.AddTransition(
new
WeaponTransition
(
Unjam_JF
,
_fin_
, C1));
236
m_fsm.AddTransition(
new
WeaponTransition
(
Unjam_JF
,
_abt_
, JF,
NULL
,
new
WeaponGuardJammed(
this
)));
237
m_fsm.AddTransition(
new
WeaponTransition
(
Unjam_JF
,
_abt_
, C0,
NULL
,
new
WeaponGuardCurrentChamberEmpty(
this
)));
238
m_fsm.AddTransition(
new
WeaponTransition
(
Unjam_JF
,
_abt_
, C1));
239
240
SetInitialState(C0);
241
242
SelectionBulletHide();
243
HideMagazine();
244
245
m_fsm.Start();
246
}
247
248
override
bool
CanEnterIronsights
()
249
{
250
ItemOptics
optic
= GetAttachedOptics();
251
if
(
optic
&&
PUScopeOptic
.Cast(
optic
))
252
return
true
;
253
return
super
.CanEnterIronsights();
254
}
255
256
override
void
SetActions
()
257
{
258
super
.SetActions();
259
AddAction
(
FirearmActionLoadMultiBullet
);
260
261
RemoveAction
(
FirearmActionLoadBulletQuick
);
// Easy reload
262
AddAction
(
FirearmActionLoadMultiBulletQuick
);
// Easy reload
263
}
264
265
//Debug menu Spawn Ground Special
266
override
void
OnDebugSpawn
()
267
{
268
super
.OnDebugSpawn();
269
270
GameInventory
inventory
= GetInventory();
271
inventory
.CreateInInventory(
"PUScopeOptic"
);
272
inventory
.CreateInInventory(
"SKS_Bayonet"
);
273
}
274
};
wpnPrint
void wpnPrint(string s)
Definition
Debug.c:1
AddAction
void AddAction(typename actionName)
Definition
AdvancedCommunication.c:212
RemoveAction
void RemoveAction(typename actionName)
Definition
AdvancedCommunication.c:242
FirearmActionLoadBulletQuick
FirearmActionLoadBullet FirearmActionBase FirearmActionLoadBulletQuick()
m_weapon
class WeaponGuardIsDestroyed extends WeaponGuardBase m_weapon
Definition
Guards.c:602
WeaponGuardWeaponOpen
void WeaponGuardWeaponOpen(Weapon_Base w=NULL)
Definition
Guards.c:604
UNKNOWN
UNKNOWN
Definition
SKS.c:20
SKS_JAM_BU1
SKS_JAM_BU1
Definition
SKS.c:24
SKS_CLO_BU0
SKS_CLO_BU0
Definition
SKS.c:21
SKSStableStateID
SKSStableStateID
Definition
SKS.c:9
SKSAnimState
SKSAnimState
Definition
SKS.c:2
OPENED
@ OPENED
Definition
SKS.c:4
DEFAULT
@ DEFAULT
default weapon state, closed and discharged
Definition
SKS.c:3
JAMMED
@ JAMMED
Definition
SKS.c:5
SKS_CLO_BU1
SKS_CLO_BU1
Definition
SKS.c:22
SKS_OPN_BU0
SKS_OPN_BU0
Definition
SKS.c:23
OnEntry
class SSPFireout extends WeaponStableState OnEntry
WeaponTransition
enum FSMTransition WeaponTransition
MuzzleState
MuzzleState
Definition
WeaponStableState.c:15
m_muzzleHasBullet
ref array< MuzzleState > m_muzzleHasBullet
Definition
WeaponStableState.c:30
AbilityRecord
pair ( action, actionType )
Definition
Weapon_Base.c:5
FirearmActionLoadMultiBullet
Definition
FirearmActionLoadMultiBullet.c:2
FirearmActionLoadMultiBulletQuick
Definition
FirearmActionLoadMultiBullet.c:95
GameInventory
script counterpart to engine's class Inventory
Definition
Inventory.c:79
ItemOptics
Definition
ItemOptics.c:2
LogManager
Definition
Debug.c:675
LogManager::IsWeaponLogEnable
static bool IsWeaponLogEnable()
Definition
Debug.c:799
Object
Definition
ObjectTyped.c:2
Param3
Definition
EntityAI.c:95
RecoilBase
Definition
RecoilBase.c:2
Rifle_Base
base for rifles @NOTE name copies config base class
Definition
SKS.c:70
Rifle_Base::L0
ref WeaponStableState L0
Definition
SKS.c:73
Rifle_Base::OnDebugSpawn
override void OnDebugSpawn()
Definition
SKS.c:266
Rifle_Base::C0
ref WeaponStableState C0
Definition
SKS.c:71
Rifle_Base::JF
ref WeaponStableState JF
Definition
SKS.c:74
Rifle_Base::CanEnterIronsights
override bool CanEnterIronsights()
Definition
SKS.c:248
Rifle_Base::C1
ref WeaponStableState C1
Definition
SKS.c:72
Rifle_Base::SpawnRecoilObject
override RecoilBase SpawnRecoilObject()
Definition
SKS.c:76
Rifle_Base::SetActions
override void SetActions()
Definition
SKS.c:256
Rifle_Base::InitStateMachine
override void InitStateMachine()
Definition
SKS.c:81
SKSRecoil
Definition
SKSRecoil.c:2
WeaponEventBase
signalize mechanism manipulation
Definition
Events.c:35
WeaponFSM
weapon finite state machine
WeaponStableState
represents weapon's stable state (i.e. the basic states that the weapon will spend the most time in)
Definition
Crossbow.c:27
WeaponStableState::IsBoltOpen
override bool IsBoltOpen()
Definition
SKS.c:48
WeaponStableState::IsJammed
override bool IsJammed()
Definition
Crossbow.c:33
WeaponStableState::OnExit
override void OnExit(WeaponEventBase e)
Definition
Crossbow.c:29
WeaponStableState::InitMuzzleArray
override void InitMuzzleArray()
Definition
Crossbow.c:35
WeaponStableState::OnEntry
override void OnEntry(WeaponEventBase e)
Definition
SKS.c:31
WeaponStableState::HasBullet
override bool HasBullet()
Definition
Crossbow.c:31
WeaponStableState::GetCurrentStateID
override int GetCurrentStateID()
Definition
Crossbow.c:30
WeaponStableState::IsRepairEnabled
override bool IsRepairEnabled()
Definition
Crossbow.c:34
WeaponStableState::HasMagazine
override bool HasMagazine()
Definition
Crossbow.c:32
WeaponStateBase
represent weapon state base
Definition
BulletHide.c:2
WeaponStateJammed
handle jamming state set jam/unjam state for weapon
Definition
SKS.c:53
WeaponStateJammed::IsBoltOpen
override bool IsBoltOpen()
Definition
SKS.c:60
WeaponStateJammed::InitMuzzleArray
override void InitMuzzleArray()
Definition
SKS.c:62
WeaponStateJammed::HasMagazine
override bool HasMagazine()
Definition
SKS.c:58
WeaponStateJammed::IsRepairEnabled
override bool IsRepairEnabled()
Definition
SKS.c:61
WeaponStateJammed::OnEntry
override void OnEntry(WeaponEventBase e)
Definition
SKS.c:54
WeaponStateJammed::GetCurrentStateID
override int GetCurrentStateID()
Definition
SKS.c:56
WeaponStateJammed::IsJammed
override bool IsJammed()
Definition
SKS.c:59
WeaponStateJammed::HasBullet
override bool HasBullet()
Definition
SKS.c:57
WeaponStateJammed::OnExit
override void OnExit(WeaponEventBase e)
Definition
SKS.c:55
WeaponUnjamming
unjam submachine
WeaponActionChamberingTypes
WeaponActionChamberingTypes
Definition
human.c:856
WeaponActions
WeaponActions
actions
Definition
human.c:796
WeaponActionUnjammingTypes
WeaponActionUnjammingTypes
Definition
human.c:892
WeaponActionFireTypes
WeaponActionFireTypes
Definition
human.c:900
scripts
4_World
Entities
Firearms
AutomaticRifle
SKS.c
Generated by
1.10.0