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.
FSMTransition< HandStateBase, HandEventBase, HandActionBase, HandGuardBase > HandTransition
InventoryLocationType
types of Inventory Location
static void InventoryHFSMLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
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...
const int c_InventoryReservationTimeoutShortMS
static proto native bool LocationSwap(notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2)
swaps two entities
script counterpart to engine's class Inventory
Abstracted event, not to be used, only inherited.
Hand finite state machine.
override bool IsWaitingForActionFinish()
void HandForceSwapingAnimated_Show(Man player=null, HandStateBase parent=null, WeaponActions action=WeaponActions.NONE, int actionType=-1)
override void OnAbort(HandEventBase e)
ref InventoryLocation m_Src2
ref InventoryLocation m_Dst2
override void OnEntry(HandEventBase e)
ref InventoryLocation m_Dst1
ref InventoryLocation m_Src1
override void OnExit(HandEventBase e)
simple class starting animation action specified by m_action and m_actionType
override void OnExit(HandEventBase e)
ref InventoryLocation m_Dst
void HandStateBase(Man player=NULL, HandStateBase parent=NULL)
nested state machine (or null)
override void OnEntry(HandEventBase e)
ref InventoryLocation m_Dst1
ref InventoryLocation m_Src1
ref HandFSM m_FSM
hierarchical parent state of this state (or null)
void HandAnimatedForceSwapping_Inst(Man player=null, HandStateBase parent=null)
ref HandAnimatedMoveToDst_W4T_Basic m_Hide
ref HandForceSwappingAnimated_Show m_Swap
ref HandAnimatedMoveToDst_W4T m_Show
override void OnAbort(HandEventBase e)
ref HandStartHidingAnimated m_Start
ref InventoryLocation m_Dst2
override bool IsWaitingForActionFinish()
waiting for active animation action/actionType finish
void HandAnimatedForceSwapping(Man player=null, HandStateBase parent=null)
ref InventoryLocation m_Src2
represent hand state base
static bool IsInventoryHFSMLogEnable()
void Error(string err)
Messagebox with error message.