33 if (m_Dst && m_Dst.IsValid())
37 if (
item.GetInventory().GetCurrentInventoryLocation(
src))
42 player.OnItemInHandsChanged();
53 Error(
"[hndfsm] " +
Object.GetDebugName(
e.m_Player) +
" STS = " +
e.m_Player.GetSimulationTimeStamp() +
" HandAnimatedMoveToDst_W4T - item " +
item +
" has no Inventory or Location, inv=" +
item.GetInventory());
56 Error(
"[hndfsm] HandAnimatedMoveToDst_W4T - event has no valid m_Dst");
100 m_FSM.SetInitialState(m_Hide);
106 HandEventMoveTo
ev_move = HandEventMoveTo.Cast(
e);
109 m_Show.m_Dst =
ev_move.GetDst();
110 m_Hide.m_ActionType =
ev_move.GetAnimationID();
111 m_Show.m_ActionType =
ev_move.GetAnimationID();
113 m_ilEntity = m_Show.m_Dst;
123 if (!
GetGame().IsDedicatedServer())
124 e.m_Player.GetHumanInventory().ClearInventoryReservationEx(
m_Entity, m_ilEntity);
136 if (!
GetGame().IsDedicatedServer())
137 e.m_Player.GetHumanInventory().ClearInventoryReservationEx(
m_Entity, m_ilEntity);
FSMTransition< HandStateBase, HandEventBase, HandActionBase, HandGuardBase > HandTransition
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 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...
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 bool IsWaitingForActionFinish()
override void OnAbort(HandEventBase e)
void HandStartHidingAnimated(Man player=null, HandStateBase parent=null, WeaponActions action=WeaponActions.NONE, int actionType=-1)
ref InventoryLocation m_Dst
override void OnEntry(HandEventBase e)
override void OnExit(HandEventBase e)
represent hand state base
override void OnExit(HandEventBase e)
override void OnEntry(HandEventBase e)
ref HandStartHidingAnimated m_Hide
weapon to be taken
ref HandAnimatedMoveToDst_W4T m_Show
override void OnAbort(HandEventBase e)
ref InventoryLocation m_ilEntity
void HandAnimatedMovingToAtt(Man player=null, HandStateBase parent=null)
static bool IsInventoryHFSMLogEnable()
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.