9 Man player = e.m_Player;
14 if (item.GetInventory().GetCurrentInventoryLocation(src))
18 player.OnItemInHandsChanged();
31 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());
34 Error(
"[hndfsm] HandAnimatedMoveToDst_W4T_Basic - event has no valid m_Dst");
74 e.m_Player.OnItemInHandsChanged();
79 if (!
GetGame().IsDedicatedServer())
94 Error(
"[hndfsm] HandForceSwappingAnimated_Show is not properly configured!");
130 ref HandAnimatedMoveToDst_W4T_Basic
m_Hide;
137 m_Hide =
new HandAnimatedMoveToDst_W4T_Basic(player,
this);
140 HandEventBase _fin_ =
new HandEventHumanCommandActionFinished;
158 HandEventForceSwap efs = HandEventForceSwap.Cast(e);
163 m_Start.m_ActionType = efs.m_AnimationID;
171 m_Show.m_ActionType = efs.m_Animation2ID;
175 m_Start.m_ActionType = efs.m_Animation2ID;
182 m_Show.m_ActionType = efs.m_AnimationID;
189 if (!
GetGame().IsDedicatedServer())
201 if ( !
GetGame().IsDedicatedServer())
228 if ( !
GetGame().IsDedicatedServer())
250 ref InventoryLocation m_Src1 = null;
251 ref InventoryLocation m_Src2 = null;
252 ref InventoryLocation m_Dst1 = null;
253 ref InventoryLocation m_Dst2 = null;
255 ref HandStartHidingAnimated m_Start;
265 HandEventBase _fin_ =
new HandEventHumanCommandActionFinished;
280 HandEventForceSwap efs = HandEventForceSwap.Cast(e);
285 m_Start.m_ActionType = efs.m_AnimationID;
292 m_Swap.m_ActionType = efs.m_Animation2ID;
296 m_Start.m_ActionType = efs.m_Animation2ID;
303 m_Swap.m_ActionType = efs.m_AnimationID;
311 if (!
GetGame().IsDedicatedServer())
323 if ( !
GetGame().IsDedicatedServer())
356 if ( !
GetGame().IsDedicatedServer())
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
FSMTransition< HandStateBase, HandEventBase, HandActionBase, HandGuardBase > HandTransition
InventoryLocationType
types of Inventory Location
bool ClearJunctureEx(Man player, notnull EntityAI item)
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
static bool CanForceSwapEntitiesEx(notnull EntityAI item1, InventoryLocation item1_dst, notnull EntityAI item2, out InventoryLocation item2_dst)
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()
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.