3 void HandStartHidingAnimated(Man player = null, HandStateBase parent = null, WeaponActions action = WeaponActions.NONE,
int actionType = -1)
28 ref InventoryLocation m_Dst;
32 if (m_Dst && m_Dst.IsValid())
35 InventoryLocation src =
new InventoryLocation;
36 if (item.GetInventory().GetCurrentInventoryLocation(src))
38 if (
g_Game.IsDedicatedServer())
44 m_Player.GetHumanInventory().ClearInventoryReservationEx(m_Dst.GetItem(), m_Dst);
48 if (
g_Game.IsMultiplayer() && InventoryDebug.IsHandAckEnable())
50 if (!
g_Game.IsDedicatedServer())
58 if (GameInventory.LocationSyncMoveEntity(src, m_Dst))
67 Error(
"[hndfsm] " +
Object.GetDebugName(
m_Player) +
" STS = " +
m_Player.GetSimulationTimeStamp() +
" HandAnimatedMoveToDst_W4T - item " + item +
" has no Inventory or Location, inv=" + item.GetInventory());
70 Error(
"[hndfsm] HandAnimatedMoveToDst_W4T - event has no valid m_Dst");
94 ref HandStartHidingAnimated m_Hide;
95 ref HandAnimatedMoveToDst_W4T m_Show;
97 ref InventoryLocation m_ilEntity;
99 void HandAnimatedMovingToAtt(Man player = null, HandStateBase parent = null)
102 m_Hide =
new HandStartHidingAnimated(player,
this, WeaponActions.HIDE, -1);
103 m_Show =
new HandAnimatedMoveToDst_W4T(player,
this, WeaponActions.SHOW, -1);
106 HandEventBase _fin_ =
new HandEventHumanCommandActionFinished;
109 m_FSM =
new HandFSM(
this);
114 m_FSM.SetInitialState(m_Hide);
120 HandEventMoveTo ev_move = HandEventMoveTo.Cast(e);
123 m_Show.m_Dst = ev_move.GetDst();
124 m_Hide.m_ActionType = ev_move.GetAnimationID();
125 m_Show.m_ActionType = ev_move.GetAnimationID();
127 m_ilEntity = m_Show.m_Dst;
129 m_Player.GetHumanInventory().AddInventoryReservationEx(
m_Entity, m_ilEntity, GameInventory.c_InventoryReservationTimeoutShortMS);
137 if ( !
g_Game.IsDedicatedServer())
139 m_Player.GetHumanInventory().ClearInventoryReservationEx(
m_Entity, m_ilEntity);
154 if ( !
g_Game.IsDedicatedServer())
156 m_Player.GetHumanInventory().ClearInventoryReservationEx(
m_Entity, m_ilEntity);
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
simple class starting animation action specified by m_action and m_actionType
represent hand state base
void Error(string err)
Messagebox with error message.
void HandEventBase(Man p=null, InventoryLocation src=null)
HandStateEquipped OnEntry
FSMTransition< HandStateBase, HandEventBase, HandActionBase, HandGuardBase > HandTransition
class WeaponChambering extends WeaponStateBase IsWaitingForActionFinish
class WeaponChambering_Chamber_OnEntry extends WeaponChambering_Base OnExit