9 ref WeaponCharging_Start
m_start;
10 ref WeaponCharging_CK m_onCK;
11 ref WeaponChamberFromAttMag_W4T
m_chamber;
12 ref WeaponEjectAndChamberFromAttMag m_ejectChamber;
18 m_actionType = actionType;
22 m_onCK =
new WeaponCharging_CK(
m_weapon,
this);
24 m_ejectChamber =
new WeaponEjectAndChamberFromAttMag(
m_weapon,
this);
92 Magazine m_dstMagazine;
100 int mi =
m_weapon.GetCurrentMuzzle();
108 m_dstMagazine = NULL;
114 m_dstMagazine = NULL;
120 if (!super.SaveCurrentFSMState(ctx))
123 if (!ctx.Write(m_dstMagazine))
125 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponEjectBullet_Cartridge.SaveCurrentFSMState: cannot write m_dstMagazine for weapon=" +
m_weapon);
133 if (!super.LoadCurrentFSMState(ctx, version))
136 if (!ctx.Read(m_dstMagazine))
138 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponEjectBullet_Cartridge.LoadCurrentFSMState: cannot read m_dstMagazine for weapon=" +
m_weapon);
148 Magazine m_dstMagazine;
156 for(
int i = 0; i <
m_weapon.GetMuzzleCount(); i++)
168 m_dstMagazine = NULL;
174 m_dstMagazine = NULL;
180 if (!super.SaveCurrentFSMState(ctx))
183 if (!ctx.Write(m_dstMagazine))
185 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponEjectBullet_Cartridge.SaveCurrentFSMState: cannot write m_dstMagazine for weapon=" +
m_weapon);
193 if (!super.LoadCurrentFSMState(ctx, version))
196 if (!ctx.Read(m_dstMagazine))
198 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponEjectBullet_Cartridge.LoadCurrentFSMState: cannot read m_dstMagazine for weapon=" +
m_weapon);
220 ref WeaponCharging_Start
m_start;
221 ref WeaponEjectBullet_Cartridge_W4T m_onBE;
222 ref WeaponEjectCasing_W4T m_onBEFireOut;
223 ref BulletHide_W4T m_hideB;
224 ref WeaponCharging_CK m_onCK;
225 ref WeaponChamberFromInnerMag_W4T
m_chamber;
227 void WeaponChargingInnerMag (
Weapon_Base w = NULL,
WeaponStateBase parent = NULL, WeaponActions action = WeaponActions.NONE,
int actionType = -1)
230 m_actionType = actionType;
234 m_onBE =
new WeaponEjectBullet_Cartridge_W4T(
m_weapon,
this);
235 m_onBEFireOut =
new WeaponEjectCasing_W4T(
m_weapon,
this);
236 m_hideB =
new BulletHide_W4T(
m_weapon,
this);
237 m_onCK =
new WeaponCharging_CK(
m_weapon,
this);
255 m_fsm.AddTransition(
new WeaponTransition(
m_start, __ck_, m_onBEFireOut, NULL,
new GuardAnd(
new GuardNot(
new WeaponGuardCurrentChamberEmpty(
m_weapon)),
new WeaponGuardCurrentChamberFiredOut(
m_weapon))));
273 m_fsm.SetInitialState(
m_start);
295 ref WeaponCharging_Start
m_start;
296 ref WeaponEjectBullet_Cartridge_W4T m_onBE;
297 ref WeaponEjectCasing_W4T m_onBEFireOut;
298 ref BulletHide_W4T m_hideB;
299 ref WeaponCharging_CK m_onCK;
300 ref WeaponChamberFromAttMag_W4T
m_chamber;
302 void WeaponChargingMultiple (
Weapon_Base w = NULL,
WeaponStateBase parent = NULL, WeaponActions action = WeaponActions.NONE,
int actionType = -1)
305 m_actionType = actionType;
309 m_onBE =
new WeaponEjectBullet_Cartridge_W4T(
m_weapon,
this);
310 m_onBEFireOut =
new WeaponEjectCasing_W4T(
m_weapon,
this);
311 m_hideB =
new BulletHide_W4T(
m_weapon,
this);
312 m_onCK =
new WeaponCharging_CK(
m_weapon,
this);
345 m_fsm.SetInitialState(
m_start);
366 ref WeaponCharging_Start
m_start;
367 ref WeaponCharging_CK m_onCK;
369 void WeaponChargingStretch (
Weapon_Base w = NULL,
WeaponStateBase parent = NULL, WeaponActions action = WeaponActions.NONE,
int actionType = -1)
372 m_actionType = actionType;
376 m_onCK =
new WeaponCharging_CK(
m_weapon,
this);
388 m_fsm.SetInitialState(
m_start);
Serialization general interface. Serializer API works with:
charging of weapon without ammo to be chambered
signalize mechanism manipulation
weapon finite state machine
simple class starting animation action specified by m_action and m_actionType
represent weapon state base
void Error(string err)
Messagebox with error message.
class WeaponGuardIsDestroyed extends WeaponGuardBase m_weapon
void WeaponGuardHasAmmo(Weapon_Base w=NULL)
HandStateEquipped OnEntry
enum FSMTransition WeaponTransition
void ejectBulletAndStoreInMagazine(Weapon_Base weapon, int muzzleIndex, Magazine mag, DayZPlayer p)
class WeaponChambering extends WeaponStateBase IsWaitingForActionFinish
ref WeaponStateBase m_start
class WeaponChambering_Chamber_OnEntry extends WeaponChambering_Base OnExit
class WeaponEndAction extends WeaponStartAction m_action
override bool LoadCurrentFSMState(ParamsReadContext ctx, int version)
ref WeaponChambering_Base m_chamber
ref WeaponEjectCasingMultiMuzzle m_eject
override bool SaveCurrentFSMState(ParamsWriteContext ctx)