DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ UpdatePossibleActions()

override void CarHornShortActionInput::UpdatePossibleActions ( PlayerBase player,
ActionTarget target,
ItemBase item,
int action_condition_mask )
inlineprivate

См. определение в файле ActionInput.c строка 674

675 {
676 if (ForceActionCheck(player))
677 {
678 m_SelectAction = m_ForcedActionData.m_Action;
679 return;
680 }
681
682 m_SelectAction = null;
683 array<ActionBase_Basic> possibleActions;
684 ActionBase action;
685 int i;
686
687 m_MainItem = null;
688 if (player && player.IsInVehicle())
689 {
690 HumanCommandVehicle vehCommand = player.GetCommand_Vehicle();
691 if (vehCommand)
692 {
693 Transport trans = vehCommand.GetTransport();
694 if (trans)
695 {
696 targetNew = new ActionTarget(trans, null, -1, vector.Zero, -1);
697 ForceActionTarget(targetNew);
698 }
699 }
700
701 if (!targetNew)
702 {
703 ClearForcedTarget();
704 }
705 }
706
707 target = m_ForcedTarget;
708 m_Target = m_ForcedTarget;
709
710 if (target && target.GetObject())
711 {
712 target.GetObject().GetActions(this.Type(), possibleActions);
713 if (possibleActions)
714 {
715 for (i = 0; i < possibleActions.Count(); i++)
716 {
717 action = ActionBase.Cast(possibleActions.Get(i));
718 if (action.Can(player, target, m_MainItem, action_condition_mask))
719 {
720 m_SelectAction = action;
721 return;
722 }
723 }
724 }
725 }
726 }
NoIndicationActionInputBase m_SelectAction
ref ActionTarget m_Target
Определения ActionInput.c:15
class ActionTargets ActionTarget
class BaitData m_MainItem
Определения ActionBase.c:36
string Type
Определения JsonDataContaminatedArea.c:11
bool Can(PlayerBase player, ActionTarget target, ItemBase item, int condition_mask)
Определения ActionBase.c:861
ref ActionTarget targetNew
Определения ActionInput.c:662
proto native Transport GetTransport()

Перекрестные ссылки ActionTarget, ActionBase::Can(), HumanCommandVehicle::GetTransport(), m_MainItem, m_SelectAction, m_Target, targetNew, Type и vector::Zero.