23 ref LoopedChambering_Wait4ShowBullet2
m_w4sb2;
25 ref BulletHide_W4T m_hideB;
42 WeaponEventContinuousLoadBulletStart __lS_ =
new WeaponEventContinuousLoadBulletStart;
43 WeaponEventContinuousLoadBulletEnd __lE_ =
new WeaponEventContinuousLoadBulletEnd;
44 WeaponEventAnimBulletShow __bs_ =
new WeaponEventAnimBulletShow;
45 WeaponEventAnimBulletHide __bh_ =
new WeaponEventAnimBulletHide;
46 WeaponEventAnimBulletEject __be_ =
new WeaponEventAnimBulletEject;
47 WeaponEventAnimBulletInMagazine __bM_ =
new WeaponEventAnimBulletInMagazine;
48 WeaponEventAnimBulletShow2 _bs2_ =
new WeaponEventAnimBulletShow2;
83 m_srcMagazine.GetInventory().GetCurrentInventoryLocation(newSrc);
95 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChambering, error - cannot remove ammo pile from inv");
101 Print(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChambering m_srcMagazine = NULL");
119 m_srcMagazine.GetInventory().GetCurrentInventoryLocation(leftHandIl);
149 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChambering, error - cannot drop ammo pile from left hand after not found inventory space for ammo pile - exit");
159 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChambering, error - cannot remove ammo pile from wpn - exit");
178 m_srcMagazine.GetInventory().GetCurrentInventoryLocation(leftHandIl);
208 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChambering, error - cannot drop ammo pile from left hand after not found inventory space for ammo pile - abort");
218 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChambering, error - cannot remove ammo pile from wpn - abort");
232 if (!super.SaveCurrentFSMState(ctx))
237 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChambering.SaveCurrentFSMState: cannot save m_srcMagazine for weapon=" +
m_weapon);
243 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChambering.SaveCurrentFSMState: cannot write m_srcMagazinePrevLocation for weapon=" +
m_weapon);
252 if (!super.LoadCurrentFSMState(ctx, version))
257 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChambering.LoadCurrentFSMState: cannot read m_srcMagazine for weapon=" +
m_weapon);
263 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChambering.LoadCurrentFSMState: cannot read m_srcMagazinePrevLocation for weapon=" +
m_weapon);
281 ref LoopedChambering_Wait4ShowBullet2
m_w4sb2;
283 ref BulletHide_W4T m_hideB;
302 WeaponEventContinuousLoadBulletStart __lS_ =
new WeaponEventContinuousLoadBulletStart;
303 WeaponEventContinuousLoadBulletEnd __lE_ =
new WeaponEventContinuousLoadBulletEnd;
304 WeaponEventAnimCocked __wc_ =
new WeaponEventAnimCocked;
305 WeaponEventAnimBulletShow __bs_ =
new WeaponEventAnimBulletShow;
306 WeaponEventAnimBulletHide __bh_ =
new WeaponEventAnimBulletHide;
307 WeaponEventAnimBulletEject __be_ =
new WeaponEventAnimBulletEject;
308 WeaponEventAnimBulletInMagazine __bM_ =
new WeaponEventAnimBulletInMagazine;
309 WeaponEventAnimBulletShow2 _bs2_ =
new WeaponEventAnimBulletShow2;
345 m_srcMagazine.GetInventory().GetCurrentInventoryLocation(newSrc);
357 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChamberingEjectLast, error - cannot remove ammo pile from inv");
363 Print(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChamberingEjectLast m_srcMagazine = NULL");
381 m_srcMagazine.GetInventory().GetCurrentInventoryLocation(leftHandIl);
411 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChamberingEjectLast, error - cannot drop ammo pile from left hand after not found inventory space for ammo pile - exit");
421 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChamberingEjectLast, error - cannot remove ammo pile from wpn - exit");
440 m_srcMagazine.GetInventory().GetCurrentInventoryLocation(leftHandIl);
470 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChamberingEjectLast, error - cannot drop ammo pile from left hand after not found inventory space for ammo pile - abort");
480 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChamberingEjectLast, error - cannot remove ammo pile from wpn - abort");
494 if (!super.SaveCurrentFSMState(ctx))
499 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChamberingEjectLast.SaveCurrentFSMState: cannot save m_srcMagazine for weapon=" +
m_weapon);
505 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChamberingEjectLast.SaveCurrentFSMState: cannot write m_srcMagazinePrevLocation for weapon=" +
m_weapon);
513 if (!super.LoadCurrentFSMState(ctx, version))
518 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChamberingEjectLast.LoadCurrentFSMState: cannot read m_srcMagazine for weapon=" +
m_weapon);
524 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" LoopedChamberingEjectLast.LoadCurrentFSMState: cannot read m_srcMagazinePrevLocation for weapon=" +
m_weapon);
void wpnDebugPrint(string s)
void DayZPlayerUtils()
cannot be instantiated
FindInventoryLocationType
flags for searching locations in inventory
bool OptionalLocationReadFromContext(out InventoryLocation loc, notnull ParamsReadContext ctx)
bool OptionalLocationWriteToContext(InventoryLocation loc, notnull ParamsWriteContext ctx)
enum FSMTransition WeaponTransition
ref LoopedChambering_Wait4ShowBullet2 m_w4sb2
ref InventoryLocation m_srcMagazinePrevLocation
source of the cartridge
ref WeaponEndAction m_endLoop
ref WeaponStateBase m_start
class WeaponEndAction extends WeaponStartAction m_action
ref WeaponChambering_Base m_chamber
ref WeaponEjectCasingMultiMuzzle m_eject
static proto native bool LocationSyncMoveEntity(notnull InventoryLocation src_loc, notnull InventoryLocation dst_loc)
synchronously removes item from current inventory location and adds it to destination no anims involv...
static proto native bool LocationCanMoveEntity(notnull InventoryLocation src, notnull InventoryLocation dst)
queries if the entity contained in inv_loc.m_item can be moved to another location This is a shorthan...
script counterpart to engine's class Inventory
proto native bool IsValid()
verify current set inventory location
proto native vector GetPos()
returns position of item in world if type is Ground
proto native void SetAttachment(notnull EntityAI parent, EntityAI e, int slotId)
sets current inventory location type to Attachment with slot id set to <slotId>
provides access to slot configuration
static bool IsWeaponLogEnable()
proto bool Write(void value_out)
proto bool Read(void value_in)
signalize mechanism manipulation
weapon finite state machine
const float MAX_DROP_MAGAZINE_DISTANCE_SQ
override bool IsWaitingForActionFinish()
simple class starting animation action specified by m_action and m_actionType
ref BulletHide_W4T m_hideB
ref WeaponChamberFromInnerMag_W4T m_chamberFromInnerMag
void WeaponStateBase(Weapon_Base w=NULL, WeaponStateBase parent=NULL)
internal state id used for load/restore
void LoopedChamberingEjectLast(Weapon_Base w=NULL, WeaponStateBase parent=NULL, WeaponActions action=WeaponActions.NONE, int startActionType=-1, int endActionType=-1)
ref WeaponStartAction m_endLoop
Magazine m_srcMagazine
destination of the ejected cartridge
ref WeaponFSM m_fsm
hierarchical parent state of this state (or null)
ref LoopedChambering_Wait4ShowBullet2 m_w4sb2
ref WeaponChambering_Cartridge m_chamber
override bool IsWaitingForActionFinish()
override void OnEntry(WeaponEventBase e)
ref WeaponStateBase m_start
source of the cartridge
override bool LoadCurrentFSMState(ParamsReadContext ctx, int version)
ref WeaponEjectCasing m_eject
ref InventoryLocation m_srcMagazinePrevLocation
source of the cartridge
override void OnAbort(WeaponEventBase e)
void WeaponEjectCasing(Weapon_Base w=NULL, WeaponStateBase parent=NULL)
void LoopedChambering(Weapon_Base w=NULL, WeaponStateBase parent=NULL, WeaponActions action=WeaponActions.NONE, int startActionType=-1, int endActionType=-1)
override void OnExit(WeaponEventBase e)
override bool SaveCurrentFSMState(ParamsWriteContext ctx)
represent weapon state base
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
Serializer ParamsReadContext
Serializer ParamsWriteContext
void Error(string err)
Messagebox with error message.
proto void Print(void var)
Prints content of variable to console/log.