80 override void InitStateMachine ()
83 m_abilities.Insert(
new AbilityRecord(WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED));
84 m_abilities.Insert(
new AbilityRecord(WeaponActions.UNJAMMING, WeaponActionUnjammingTypes.UNJAMMING_START));
85 m_abilities.Insert(
new AbilityRecord(WeaponActions.UNJAMMING, WeaponActionUnjammingTypes.UNJAMMING_END));
87 m_abilities.Insert(
new AbilityRecord(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_NORMAL));
88 m_abilities.Insert(
new AbilityRecord(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_DRY));
90 m_abilities.Insert(
new AbilityRecord(WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_STARTLOOPABLE_SHOTGUN_COCKED));
91 m_abilities.Insert(
new AbilityRecord(WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_STARTLOOPABLE_SHOTGUN_UNCOCKED));
92 m_abilities.Insert(
new AbilityRecord(WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_ENDLOOPABLE));
100 WeaponStateBase Mech_E =
new WeaponChargingInnerMag(
this, NULL, WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED);
101 WeaponStateBase Mech_F =
new WeaponChargingInnerMag(
this, NULL, WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED);
102 WeaponStateBase Mech_L =
new WeaponChargingInnerMag(
this, NULL, WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED);
104 LoopedChamberingEjectLast Chamber_E =
new LoopedChamberingEjectLast(
this, NULL, WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_STARTLOOPABLE_SHOTGUN_UNCOCKED, WeaponActionChamberingTypes.CHAMBERING_ENDLOOPABLE);
105 LoopedChamberingEjectLast Chamber_F =
new LoopedChamberingEjectLast(
this, NULL, WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_STARTLOOPABLE_SHOTGUN_UNCOCKED, WeaponActionChamberingTypes.CHAMBERING_ENDLOOPABLE);
106 LoopedChamberingEjectLast Chamber_L =
new LoopedChamberingEjectLast(
this, NULL, WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_STARTLOOPABLE_SHOTGUN_COCKED, WeaponActionChamberingTypes.CHAMBERING_ENDLOOPABLE);
110 WeaponStateBase Trigger_E =
new WeaponDryFire(
this, NULL, WeaponActions.FIRE, WeaponActionFireTypes.FIRE_DRY);
111 WeaponStateBase Trigger_F =
new WeaponDryFire(
this, NULL, WeaponActions.FIRE, WeaponActionFireTypes.FIRE_DRY);
113 WeaponStateBase Trigger_J =
new WeaponDryFire(
this, NULL, WeaponActions.FIRE, WeaponActionFireTypes.FIRE_DRY);
134 m_fsm.AddTransition(
new WeaponTransition( Mech_L, _fin_,
E, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
136 m_fsm.AddTransition(
new WeaponTransition( Mech_L, _abt_,
E, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
140 m_fsm.AddTransition(
new WeaponTransition( Mech_F, _fin_,
E, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
141 m_fsm.AddTransition(
new WeaponTransition( Mech_F, _fin_,
F, NULL,
new WeaponGuardCurrentChamberFiredOut(
this)));
143 m_fsm.AddTransition(
new WeaponTransition( Mech_F, _abt_,
E, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
144 m_fsm.AddTransition(
new WeaponTransition( Mech_F, _abt_,
F, NULL,
new WeaponGuardCurrentChamberFiredOut(
this)));
150 m_fsm.AddTransition(
new WeaponTransition( Chamber_E, _fin_,
E, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
152 m_fsm.AddTransition(
new WeaponTransition( Chamber_E, _abt_,
E, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
155 m_fsm.AddTransition(
new WeaponTransition(
L, __L__, Chamber_L, NULL,
new GuardNot(
new WeaponGuardInnerMagazineFull(
this))));
159 m_fsm.AddTransition(
new WeaponTransition(
F, __L__, Chamber_F, NULL,
new GuardNot(
new WeaponGuardInnerMagazineFull(
this))));
160 m_fsm.AddTransition(
new WeaponTransition( Chamber_F, _fin_,
F, NULL,
new WeaponGuardCurrentChamberFiredOut(
this)));
162 m_fsm.AddTransition(
new WeaponTransition( Chamber_F, _abt_,
F, NULL,
new WeaponGuardCurrentChamberFiredOut(
this)));
169 m_fsm.AddTransition(
new WeaponTransition( Unjam_J, _fin_, J, NULL,
new WeaponGuardJammed(
this)));
170 m_fsm.AddTransition(
new WeaponTransition( Unjam_J, _fin_,
E, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
172 m_fsm.AddTransition(
new WeaponTransition( Unjam_J, _abt_, J, NULL,
new WeaponGuardJammed(
this)));
173 m_fsm.AddTransition(
new WeaponTransition( Unjam_J, _abt_,
E, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
208 SelectionBulletHide();
214 override bool CanChamberBullet (
int muzzleIndex, Magazine mag)
216 return CanChamberFromMag(muzzleIndex, mag) && !IsInternalMagazineFull(muzzleIndex);
219 override void SetActions()
229 override void OnDebugSpawn()
231 super.OnDebugSpawn();
237 if (
Class.CastTo(entity,
this) )
239 entity.SpawnEntityOnGroundPos(
"Ammo_12gaPellets", entity.GetPosition());