130 override void InitStateMachine()
132 m_abilities.Insert(
new AbilityRecord(WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_END));
133 m_abilities.Insert(
new AbilityRecord(WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_DOUBLE_1));
134 m_abilities.Insert(
new AbilityRecord(WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_DOUBLE_2));
135 m_abilities.Insert(
new AbilityRecord(WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_DOUBLE_3));
136 m_abilities.Insert(
new AbilityRecord(WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_DOUBLE_4));
137 m_abilities.Insert(
new AbilityRecord(WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_DOUBLE_FIREOUT_EJECT));
140 m_abilities.Insert(
new AbilityRecord(WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED));
141 m_abilities.Insert(
new AbilityRecord(WeaponActions.UNJAMMING, WeaponActionUnjammingTypes.UNJAMMING_START));
142 m_abilities.Insert(
new AbilityRecord(WeaponActions.UNJAMMING, WeaponActionUnjammingTypes.UNJAMMING_END));
144 m_abilities.Insert(
new AbilityRecord(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_NORMAL));
145 m_abilities.Insert(
new AbilityRecord(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_DRY));
162 ChamberMultiBullet Chamber_E =
new ChamberMultiBullet(
this, NULL, WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_DOUBLE_2,WeaponActionChamberingTypes.CHAMBERING_END);
163 ChamberMultiBullet Chamber_F =
new ChamberMultiBullet(
this, NULL, WeaponActions.CHAMBERING, GetAnimationForChamberingWithEjection(),WeaponActionChamberingTypes.CHAMBERING_END);
165 ChamberMultiBullet Chamber_L_E =
new ChamberMultiBullet(
this, NULL, WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_DOUBLE_3,WeaponActionChamberingTypes.CHAMBERING_END);
166 ChamberMultiBullet Chamber_F_L =
new ChamberMultiBullet(
this, NULL, WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_DOUBLE_4,WeaponActionChamberingTypes.CHAMBERING_END);
167 ChamberMultiBullet Chamber_E_L =
new ChamberMultiBullet(
this, NULL, WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_DOUBLE_1,WeaponActionChamberingTypes.CHAMBERING_END);
176 WeaponStateBase Trigger_F_F =
new WeaponDryFire(
this, NULL, WeaponActions.FIRE, WeaponActionFireTypes.FIRE_DRY);
177 WeaponStateBase Trigger_F_E =
new WeaponDryFire(
this, NULL, WeaponActions.FIRE, WeaponActionFireTypes.FIRE_DRY);
178 WeaponStateBase Trigger_E_F =
new WeaponDryFire(
this, NULL, WeaponActions.FIRE, WeaponActionFireTypes.FIRE_DRY);
179 WeaponStateBase Trigger_E_E =
new WeaponDryFire(
this, NULL, WeaponActions.FIRE, WeaponActionFireTypes.FIRE_DRY);
202 m_fsm.AddTransition(
new WeaponTransition( Mech, _abt_, F_F, NULL,
new GuardAnd(
new WeaponGuardChamberFiredOut(
this, MuzzleIndex.First),
new WeaponGuardChamberFiredOut(
this, MuzzleIndex.Second))));
203 m_fsm.AddTransition(
new WeaponTransition( Mech, _abt_, F_E, NULL,
new GuardAnd(
new WeaponGuardChamberFiredOut(
this, MuzzleIndex.First),
new WeaponGuardChamberEmpty(
this, MuzzleIndex.Second))));
204 m_fsm.AddTransition(
new WeaponTransition( Mech, _abt_, E_F, NULL,
new GuardAnd(
new WeaponGuardChamberEmpty(
this, MuzzleIndex.First),
new WeaponGuardChamberFiredOut(
this, MuzzleIndex.Second))));
205 m_fsm.AddTransition(
new WeaponTransition( Mech, _abt_, F_L, NULL,
new GuardAnd(
new WeaponGuardChamberFiredOut(
this, MuzzleIndex.First),
new WeaponGuardChamberFull(
this, MuzzleIndex.Second))));
206 m_fsm.AddTransition(
new WeaponTransition( Mech, _abt_, L_L, NULL,
new GuardAnd(
new WeaponGuardChamberFull(
this, MuzzleIndex.First),
new WeaponGuardChamberFull(
this, MuzzleIndex.Second))));
207 m_fsm.AddTransition(
new WeaponTransition( Mech, _abt_, L_E, NULL,
new GuardAnd(
new WeaponGuardChamberFull(
this, MuzzleIndex.First),
new WeaponGuardChamberEmpty(
this, MuzzleIndex.Second))));
208 m_fsm.AddTransition(
new WeaponTransition( Mech, _abt_, E_L, NULL,
new GuardAnd(
new WeaponGuardChamberEmpty(
this, MuzzleIndex.First),
new WeaponGuardChamberFull(
this, MuzzleIndex.Second))));
212 m_fsm.AddTransition(
new WeaponTransition( Chamber_E, _fin_, L_E, NULL,
new WeaponGuardChamberEmpty(
this, MuzzleIndex.Second)));
215 m_fsm.AddTransition(
new WeaponTransition( Chamber_E, _abt_, L_L, NULL,
new GuardAnd(
new WeaponGuardChamberFull(
this, MuzzleIndex.First),
new WeaponGuardChamberFull(
this, MuzzleIndex.Second))));
216 m_fsm.AddTransition(
new WeaponTransition( Chamber_E, _abt_, L_E, NULL,
new GuardAnd(
new WeaponGuardChamberFull(
this, MuzzleIndex.First),
new WeaponGuardChamberEmpty(
this, MuzzleIndex.Second))));
223 m_fsm.AddTransition(
new WeaponTransition( Chamber_F, _fin_, L_E, NULL,
new WeaponGuardChamberEmpty(
this, MuzzleIndex.Second)));
226 m_fsm.AddTransition(
new WeaponTransition( Chamber_F, _abt_, F_F, NULL,
new GuardAnd(
new WeaponGuardChamberFiredOut(
this, MuzzleIndex.First),
new WeaponGuardChamberFiredOut(
this, MuzzleIndex.Second))));
227 m_fsm.AddTransition(
new WeaponTransition( Chamber_F, _abt_, F_E, NULL,
new GuardAnd(
new WeaponGuardChamberFiredOut(
this, MuzzleIndex.First),
new WeaponGuardChamberEmpty(
this, MuzzleIndex.Second))));
228 m_fsm.AddTransition(
new WeaponTransition( Chamber_F, _abt_, E_F, NULL,
new GuardAnd(
new WeaponGuardChamberEmpty(
this, MuzzleIndex.First),
new WeaponGuardChamberFiredOut(
this, MuzzleIndex.Second))));
229 m_fsm.AddTransition(
new WeaponTransition( Chamber_F, _abt_, L_L, NULL,
new GuardAnd(
new WeaponGuardChamberFull(
this, MuzzleIndex.First),
new WeaponGuardChamberFull(
this, MuzzleIndex.Second))));
230 m_fsm.AddTransition(
new WeaponTransition( Chamber_F, _abt_, L_E, NULL,
new GuardAnd(
new WeaponGuardChamberFull(
this, MuzzleIndex.First),
new WeaponGuardChamberEmpty(
this, MuzzleIndex.Second))));
235 m_fsm.AddTransition(
new WeaponTransition( Chamber_L_E, _abt_, L_L, NULL,
new WeaponGuardChamberFull(
this, MuzzleIndex.Second)));
237 m_fsm.AddTransition(
new WeaponTransition( Chamber_L_E, _fin_, L_L, NULL,
new WeaponGuardChamberFull(
this, MuzzleIndex.Second)));
241 m_fsm.AddTransition(
new WeaponTransition( Chamber_E_L, _abt_, L_L, NULL,
new WeaponGuardChamberFull(
this, MuzzleIndex.First)));
243 m_fsm.AddTransition(
new WeaponTransition( Chamber_E_L, _fin_, L_L, NULL,
new WeaponGuardChamberFull(
this, MuzzleIndex.First)));
247 m_fsm.AddTransition(
new WeaponTransition( Chamber_F_L, _abt_, F_L, NULL,
new WeaponGuardChamberFiredOut(
this, MuzzleIndex.First)));
248 m_fsm.AddTransition(
new WeaponTransition( Chamber_F_L, _abt_, L_L, NULL,
new GuardAnd(
new WeaponGuardChamberFull(
this, MuzzleIndex.First),
new WeaponGuardChamberFull(
this, MuzzleIndex.Second))));
249 m_fsm.AddTransition(
new WeaponTransition( Chamber_F_L, _abt_, E_L, NULL,
new GuardAnd(
new WeaponGuardChamberEmpty(
this, MuzzleIndex.First),
new WeaponGuardChamberFull(
this, MuzzleIndex.Second))));
251 m_fsm.AddTransition(
new WeaponTransition( Chamber_F_L, _fin_, F_L, NULL,
new WeaponGuardChamberFiredOut(
this, MuzzleIndex.First)));
252 m_fsm.AddTransition(
new WeaponTransition( Chamber_F_L, _fin_, L_L, NULL,
new GuardAnd(
new WeaponGuardChamberFull(
this, MuzzleIndex.First),
new WeaponGuardChamberFull(
this, MuzzleIndex.Second))));
253 m_fsm.AddTransition(
new WeaponTransition( Chamber_F_L, _fin_, E_L, NULL,
new GuardAnd(
new WeaponGuardChamberEmpty(
this, MuzzleIndex.First),
new WeaponGuardChamberFull(
this, MuzzleIndex.Second))));
272 m_fsm.AddTransition(
new WeaponTransition( Trigger_L_L, _fin_, F_F, NULL,
new GuardAnd(
new WeaponGuardChamberFiredOut(
this, MuzzleIndex.First),
new WeaponGuardChamberFiredOut(
this, MuzzleIndex.Second))));
273 m_fsm.AddTransition(
new WeaponTransition( Trigger_L_L, _rto_, F_F, NULL,
new GuardAnd(
new WeaponGuardChamberFiredOut(
this, MuzzleIndex.First),
new WeaponGuardChamberFiredOut(
this, MuzzleIndex.Second))));
274 m_fsm.AddTransition(
new WeaponTransition( Trigger_L_L, _abt_, F_F, NULL,
new GuardAnd(
new WeaponGuardChamberFiredOut(
this, MuzzleIndex.First),
new WeaponGuardChamberFiredOut(
this, MuzzleIndex.Second))));
301 SetInitialState(E_E);
303 for(
int i = 0; i < GetMuzzleCount(); i++)
311 override bool CanChamberBullet (
int muzzleIndex, Magazine mag)
313 if( CanChamberFromMag(muzzleIndex, mag) )
315 if(IsChamberEmpty(muzzleIndex))
331 override void SetNextWeaponMode(
int muzzleIndex)
333 for (
int i = 0; i < GetMuzzleCount(); i++)
335 SetNextMuzzleMode(i);
339 int GetAnimationForChamberingWithEjection()
341 return WeaponActionChamberingTypes.CHAMBERING_DOUBLE_2;