9 Man player = e.m_Player;
14 if (item.GetInventory().GetCurrentInventoryLocation(src))
16 if (
g_Game.IsDedicatedServer())
25 if (
g_Game.IsMultiplayer() && InventoryDebug.IsHandAckEnable())
27 if (!
g_Game.IsDedicatedServer())
37 player.OnItemInHandsChanged();
53 Error(
"[hndfsm] " +
Object.GetDebugName(e.m_Player) +
" STS = " + e.m_Player.GetSimulationTimeStamp() +
" HandAnimatedMoveToDst_W4T_Basic - item " + item +
" has no Inventory or Location, inv=" + item.GetInventory());
56 Error(
"[hndfsm] HandAnimatedMoveToDst_W4T_Basic - event has no valid m_Dst");
89 if (
g_Game.IsDedicatedServer())
100 #ifdef DIAG_DEVELOPER
101 if (
g_Game.IsMultiplayer() && InventoryDebug.IsHandAckEnable())
103 if (!
g_Game.IsDedicatedServer())
113 e.m_Player.OnItemInHandsChanged();
115 #ifdef DIAG_DEVELOPER
120 Error(
"[hndfsm] HandForceSwappingAnimated_Show is not properly configured!");
156 ref HandAnimatedMoveToDst_W4T_Basic
m_Hide;
163 m_Hide =
new HandAnimatedMoveToDst_W4T_Basic(player,
this);
166 HandEventBase _fin_ =
new HandEventHumanCommandActionFinished;
184 HandEventForceSwap efs = HandEventForceSwap.Cast(e);
189 m_Start.m_ActionType = efs.m_AnimationID;
197 m_Show.m_ActionType = efs.m_Animation2ID;
201 m_Start.m_ActionType = efs.m_Animation2ID;
208 m_Show.m_ActionType = efs.m_AnimationID;
215 if (!
g_Game.IsDedicatedServer())
227 if ( !
g_Game.IsDedicatedServer())
262 if ( !
g_Game.IsDedicatedServer())
284 ref InventoryLocation m_Src1 = null;
285 ref InventoryLocation m_Src2 = null;
286 ref InventoryLocation m_Dst1 = null;
287 ref InventoryLocation m_Dst2 = null;
289 ref HandStartHidingAnimated m_Start;
299 HandEventBase _fin_ =
new HandEventHumanCommandActionFinished;
314 HandEventForceSwap efs = HandEventForceSwap.Cast(e);
319 m_Start.m_ActionType = efs.m_AnimationID;
326 m_Swap.m_ActionType = efs.m_Animation2ID;
330 m_Start.m_ActionType = efs.m_Animation2ID;
337 m_Swap.m_ActionType = efs.m_AnimationID;
345 if (!
g_Game.IsDedicatedServer())
357 if ( !
g_Game.IsDedicatedServer())
390 if ( !
g_Game.IsDedicatedServer())
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
static void InventoryHFSMLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
script counterpart to engine's class Inventory
const int c_InventoryReservationTimeoutShortMS
static proto native bool LocationSwap(notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2)
static proto native bool LocationSyncMoveEntity(notnull InventoryLocation src_loc, notnull InventoryLocation dst_loc)
Abstracted event, not to be used, only inherited.
Hand finite state machine.
simple class starting animation action specified by m_action and m_actionType
override void OnAbort(HandEventBase e)
override void OnEntry(HandEventBase e)
ref InventoryLocation m_Src2
override void OnExit(HandEventBase e)
ref InventoryLocation m_Dst1
void HandForceSwapingAnimated_Show(Man player=null, HandStateBase parent=null, WeaponActions action=WeaponActions.NONE, int actionType=-1)
ref InventoryLocation m_Dst2
override bool IsWaitingForActionFinish()
ref InventoryLocation m_Src1
represent hand state base
void HandAnimatedForceSwapping_Inst(Man player=null, HandStateBase parent=null)
override void OnAbort(HandEventBase e)
override void OnEntry(HandEventBase e)
ref InventoryLocation m_Dst
ref HandStartHidingAnimated m_Start
ref HandForceSwappingAnimated_Show m_Swap
void HandAnimatedForceSwapping(Man player=null, HandStateBase parent=null)
ref HandFSM m_FSM
hierarchical parent state of this state (or null)
ref InventoryLocation m_Src2
void HandStateBase(Man player=NULL, HandStateBase parent=NULL)
nested state machine (or null)
override void OnExit(HandEventBase e)
ref InventoryLocation m_Dst1
ref InventoryLocation m_Dst2
ref HandAnimatedMoveToDst_W4T_Basic m_Hide
ref HandAnimatedMoveToDst_W4T m_Show
override bool IsWaitingForActionFinish()
waiting for active animation action/actionType finish
ref InventoryLocation m_Src1
static bool IsInventoryHFSMLogEnable()
void Error(string err)
Messagebox with error message.
FSMTransition< HandStateBase, HandEventBase, HandActionBase, HandGuardBase > HandTransition
InventoryLocationType
types of Inventory Location