14 const float MIN_DISTANCE_TO_INTERRUPT = 1.0;
15 const int IAH_SINGLE_USE = 1;
16 const int IAH_CONTINUOUS = 2;
26 m_useItemInHands =
false;
32 Object target_parent =
null;
35 target_parent = target_item.GetHierarchyParent();
39 SetAction(action, at, main_item );
49 m_mainItem = main_item;
52 m_useItemInHands = main_item == itemInHand;
54 m_actionStartPos =
m_player.GetPosition();
58 mngr.ForceTarget(m_target.GetObject());
60 GetGame().GetMission().HideInventory();
71 if( !m_isActive )
return;
79 if(
GetGame().IsInventoryOpen() )
89 if( handItem != m_mainItem )
96 if(
Math.AbsFloat(
vector.Distance(m_actionStartPos,
m_player.GetPosition())) > MIN_DISTANCE_TO_INTERRUPT )
105 void DeactiveAction()
107 if( !m_isActive )
return;
114 mngr.EjectAction(m_action);
115 mngr.ClearForceTarget();
117 m_player.GetCraftingManager().ResetInventoryCraft();
122 m_useItemInHands =
false;