34 override bool HasBullet () {
return true; }
36 override bool IsJammed () {
return false; }
45 override bool HasBullet () {
return true; }
47 override bool IsJammed () {
return false; }
56 override bool HasBullet () {
return false; }
58 override bool IsJammed () {
return false; }
67 override bool HasBullet () {
return true; }
69 override bool IsJammed () {
return true; }
79 override bool HasBullet () {
return true; }
81 override bool IsJammed () {
return true; }
101 void RifleBoltFree_Base ()
106 override void InitStateMachine()
199 m_fsm.AddTransition(
new WeaponTransition( Mech_C10, _fin_, C00, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
201 m_fsm.AddTransition(
new WeaponTransition( Mech_C10, _abt_, C00, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
205 m_fsm.AddTransition(
new WeaponTransition( Mech_C11, _fin_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this) ));
207 m_fsm.AddTransition(
new WeaponTransition( Mech_C11, _abt_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this) ));
211 m_fsm.AddTransition(
new WeaponTransition( Mech_C01, _fin_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
213 m_fsm.AddTransition(
new WeaponTransition( Mech_C01, _abt_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
267 m_fsm.AddTransition(
new WeaponTransition( Chamber_C00, _fin_, C00, NULL,
new WeaponGuardCurrentChamberEmpty(
this) ));
269 m_fsm.AddTransition(
new WeaponTransition( Chamber_C00, _abt_, C00, NULL,
new WeaponGuardCurrentChamberEmpty(
this) ));
273 m_fsm.AddTransition(
new WeaponTransition( Chamber_C01, _fin_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this) ));
275 m_fsm.AddTransition(
new WeaponTransition( Chamber_C01, _abt_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this) ));
279 m_fsm.AddTransition(
new WeaponTransition( C00, __A__, Attach_C00, NULL,
new WeaponGuardCanAttachMag(
this)));
280 m_fsm.AddTransition(
new WeaponTransition( Attach_C00, _fin_, C11, NULL,
new WeaponGuardCurrentChamberFull(
this)));
281 m_fsm.AddTransition(
new WeaponTransition( Attach_C00, _fin_, C01, NULL,
new WeaponGuardHasMag(
this)));
283 m_fsm.AddTransition(
new WeaponTransition( Attach_C00, _abt_, C11, NULL,
new WeaponGuardCurrentChamberFull(
this)));
284 m_fsm.AddTransition(
new WeaponTransition( Attach_C00, _abt_, C01, NULL,
new WeaponGuardHasMag(
this)));
287 m_fsm.AddTransition(
new WeaponTransition( C10, __A__, Attach_C10, NULL,
new WeaponGuardCanAttachMag(
this)));
288 m_fsm.AddTransition(
new WeaponTransition( Attach_C10, _fin_, C11, NULL,
new WeaponGuardHasMag(
this)));
290 m_fsm.AddTransition(
new WeaponTransition( Attach_C10, _abt_, C11, NULL,
new WeaponGuardHasMag(
this)));
293 m_fsm.AddTransition(
new WeaponTransition( JF0, __A__, Attach_JF0, NULL,
new WeaponGuardCanAttachMag(
this)));
294 m_fsm.AddTransition(
new WeaponTransition( Attach_JF0, _fin_, JF1, NULL,
new WeaponGuardHasMag(
this)));
296 m_fsm.AddTransition(
new WeaponTransition( Attach_JF0, _abt_, JF1, NULL,
new WeaponGuardHasMag(
this)));
300 m_fsm.AddTransition(
new WeaponTransition( C11, __S__, Reload_C11, NULL,
new WeaponGuardCanSwapMag(
this)));
301 m_fsm.AddTransition(
new WeaponTransition( Reload_C11, _fin_, C11, NULL,
new WeaponGuardHasMag(
this)));
303 m_fsm.AddTransition(
new WeaponTransition( Reload_C11, _abt_, C11, NULL,
new WeaponGuardHasMag(
this)));
306 m_fsm.AddTransition(
new WeaponTransition( C01, __S__, Reload_C01, NULL,
new WeaponGuardCanSwapMag(
this)));
307 m_fsm.AddTransition(
new WeaponTransition( Reload_C01, _fin_, C11, NULL,
new WeaponGuardCurrentChamberFull(
this)));
308 m_fsm.AddTransition(
new WeaponTransition( Reload_C01, _fin_, C01, NULL,
new WeaponGuardHasMag(
this)));
310 m_fsm.AddTransition(
new WeaponTransition( Reload_C01, _abt_, C11, NULL,
new WeaponGuardCurrentChamberFull(
this)));
311 m_fsm.AddTransition(
new WeaponTransition( Reload_C01, _abt_, C01, NULL,
new WeaponGuardHasMag(
this)));
314 m_fsm.AddTransition(
new WeaponTransition( JF1, __S__, Reload_JF1, NULL,
new WeaponGuardCanSwapMag(
this)));
315 m_fsm.AddTransition(
new WeaponTransition( Reload_JF1, _fin_, JF1, NULL,
new WeaponGuardHasMag(
this)));
317 m_fsm.AddTransition(
new WeaponTransition( Reload_JF1, _abt_, JF1, NULL,
new WeaponGuardHasMag(
this)));
322 m_fsm.AddTransition(
new WeaponTransition( C11, __D__, Detach_C11, NULL,
new WeaponGuardCanDetachMag(
this)));
323 m_fsm.AddTransition(
new WeaponTransition( Detach_C11, _fin_, C11, NULL,
new WeaponGuardHasMag(
this)));
325 m_fsm.AddTransition(
new WeaponTransition( Detach_C11, _abt_, C11, NULL,
new WeaponGuardHasMag(
this)));
329 m_fsm.AddTransition(
new WeaponTransition( C01, __D__, Detach_C01, NULL,
new WeaponGuardCanDetachMag(
this)));
330 m_fsm.AddTransition(
new WeaponTransition( Detach_C01, _fin_, C01, NULL,
new WeaponGuardHasMag(
this)));
332 m_fsm.AddTransition(
new WeaponTransition( Detach_C01, _abt_, C01, NULL,
new WeaponGuardHasMag(
this)));
335 m_fsm.AddTransition(
new WeaponTransition( JF1, __D__, Detach_JF1, NULL,
new WeaponGuardCanDetachMag(
this)));
336 m_fsm.AddTransition(
new WeaponTransition( Detach_JF1, _fin_, JF1, NULL,
new WeaponGuardHasMag(
this)));
338 m_fsm.AddTransition(
new WeaponTransition( Detach_JF1, _abt_, JF1, NULL,
new WeaponGuardHasMag(
this)));
343 m_fsm.AddTransition(
new WeaponTransition( Unjam_JF0, _fin_, JF0, NULL,
new WeaponGuardJammed(
this)));
345 m_fsm.AddTransition(
new WeaponTransition( Unjam_JF0, _abt_, JF0, NULL,
new WeaponGuardJammed(
this)));
349 m_fsm.AddTransition(
new WeaponTransition( Unjam_JF1, _fin_, JF1, NULL,
new WeaponGuardJammed(
this)));
350 m_fsm.AddTransition(
new WeaponTransition( Unjam_JF1, _fin_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
352 m_fsm.AddTransition(
new WeaponTransition( Unjam_JF1, _abt_, JF1, NULL,
new WeaponGuardJammed(
this)));
353 m_fsm.AddTransition(
new WeaponTransition( Unjam_JF1, _abt_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
356 SetInitialState(C00);
358 SelectionBulletHide();
364 override float GetChanceToJam()
366 float chanceToJam = super.GetChanceToJam();
367 Magazine mag = GetMagazine(GetCurrentMuzzle());
371 chanceToJam = chanceToJam + ((1.0 - chanceToJam) * mag.GetChanceToJam());
375 chanceToJam = chanceToJam + ((1.0 - chanceToJam) * 0.06);