44 int mi =
m_weapon.GetCurrentMuzzle();
45 string magazineTypeName =
m_weapon.GetChamberedCartridgeMagazineTypeName(mi);
48 if (
m_weapon.GetCartridgeInfo(mi, damage, type))
53 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponRechamber - error, cannot prepare mag for catridge, magType=" + magazineTypeName);
66 m_eje.m_dstMagazine = NULL;
67 m_loa.m_srcMagazine = NULL;
72 if (!super.SaveCurrentFSMState(ctx))
77 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponChambering.SaveCurrentFSMState: cannot save m_dstMagazine for weapon=" +
m_weapon);
82 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponChambering.SaveCurrentFSMState: cannot save m_srcMagazine for weapon=" +
m_weapon);
90 if (!super.LoadCurrentFSMState(ctx, version))
95 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponChambering.LoadCurrentFSMState: cannot read m_dstMagazine for weapon=" +
m_weapon);
100 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponChambering.LoadCurrentFSMState: cannot read m_srcMagazine for weapon=" +
m_weapon);
void wpnDebugPrint(string s)
void DayZPlayerUtils()
cannot be instantiated
enum FSMTransition WeaponTransition
static bool IsWeaponLogEnable()
proto bool Write(void value_out)
proto bool Read(void value_in)
signalize mechanism manipulation
weapon finite state machine
void WeaponStateBase(Weapon_Base w=NULL, WeaponStateBase parent=NULL)
internal state id used for load/restore
void WeaponEjectBullet(Weapon_Base w=NULL, WeaponStateBase parent=NULL, WeaponActions action=WeaponActions.NONE, int actionType=-1)
Magazine m_srcMagazine
destination of the ejected cartridge
ref WeaponFSM m_fsm
hierarchical parent state of this state (or null)
void WeaponChambering(Weapon_Base w=NULL, WeaponStateBase parent=NULL, WeaponActions action=WeaponActions.NONE, int actionType=-1)
ref WeaponEjectBullet m_eje
source of the loaded cartridge
override void OnEntry(WeaponEventBase e)
override bool LoadCurrentFSMState(ParamsReadContext ctx, int version)
ref WeaponChambering m_loa
void WeaponRechamber(Weapon_Base w=NULL, WeaponStateBase parent=NULL, int actionEject=-1, int actionTypeEject=-1, int actionLoad=-1, int actionTypeLoad=-1)
override void OnExit(WeaponEventBase e)
override bool SaveCurrentFSMState(ParamsWriteContext ctx)
represent weapon state base
Serializer ParamsReadContext
Serializer ParamsWriteContext
void Error(string err)
Messagebox with error message.