3 void HandStartHidingAnimated(Man player = null,
HandStateBase parent = null, WeaponActions action = WeaponActions.NONE,
int actionType = -1)
32 if (m_Dst && m_Dst.IsValid())
36 if (item.GetInventory().GetCurrentInventoryLocation(src))
38 if (!
GetGame().IsDedicatedServer())
42 m_Player.GetHumanInventory().ClearInventoryReservationEx(m_Dst.GetItem(), m_Dst);
48 m_Player.GetHumanInventory().ClearInventoryReservationEx(m_Dst.GetItem(), m_Dst);
58 Error(
"[hndfsm] " +
Object.GetDebugName(
m_Player) +
" STS = " +
m_Player.GetSimulationTimeStamp() +
" HandAnimatedMoveToDst_W4T - item " + item +
" has no Inventory or Location, inv=" + item.GetInventory());
61 Error(
"[hndfsm] HandAnimatedMoveToDst_W4T - event has no valid m_Dst");
85 ref HandStartHidingAnimated m_Hide;
86 ref HandAnimatedMoveToDst_W4T m_Show;
90 void HandAnimatedMovingToAtt(Man player = null,
HandStateBase parent = null)
93 m_Hide =
new HandStartHidingAnimated(player,
this, WeaponActions.HIDE, -1);
94 m_Show =
new HandAnimatedMoveToDst_W4T(player,
this, WeaponActions.SHOW, -1);
97 HandEventBase _fin_ =
new HandEventHumanCommandActionFinished;
105 m_FSM.SetInitialState(m_Hide);
111 HandEventMoveTo ev_move = HandEventMoveTo.Cast(e);
114 m_Show.m_Dst = ev_move.GetDst();
115 m_Hide.m_ActionType = ev_move.GetAnimationID();
116 m_Show.m_ActionType = ev_move.GetAnimationID();
118 m_ilEntity = m_Show.m_Dst;
128 if ( !
GetGame().IsDedicatedServer())
130 m_Player.GetHumanInventory().ClearInventoryReservationEx(
m_Entity, m_ilEntity);
145 if ( !
GetGame().IsDedicatedServer())
147 m_Player.GetHumanInventory().ClearInventoryReservationEx(
m_Entity, m_ilEntity);
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
override void OnItemInHandsChanged()
script counterpart to engine's class Inventory
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
Abstracted event, not to be used, only inherited.
Hand finite state machine.
simple class starting animation action specified by m_action and m_actionType
represent hand state base
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.
HandStateEquipped OnEntry
FSMTransition< HandStateBase, HandEventBase, HandActionBase, HandGuardBase > HandTransition
class WeaponChambering extends WeaponStateBase IsWaitingForActionFinish
class WeaponChambering_Chamber_OnEntry extends WeaponChambering_Base OnExit