26 string animSource =
"";
29 if (player && player.GetCommand_Vehicle())
31 if (
Class.
CastTo(car, player.GetCommand_Vehicle().GetTransport()))
33 int crewIdx = car.CrewMemberIndex(player);
36 if (crewIdx < 0 || crewIdx > car.CrewSize() || car.
GetCarDoorsState(car.GetDoorInvSlotNameFromSeatPos(crewIdx)) ==
CarDoorState.DOORS_MISSING)
49 int safeCrewIdx = crewIdx % 4;
52 float animationPhaseInside = car.GetAnimationPhase(animSource);
62 super.OnStartServer(action_data);
76 string animSource =
"";
79 if (player && player.GetCommand_Vehicle())
81 car =
CarScript.Cast(player.GetCommand_Vehicle().GetTransport());
84 int crewIdx = car.CrewMemberIndex(player);
91 car.SetAnimationPhase(animSource, phase);
97 super.OnEndServer(action_data);
101 if (player && player.GetCommand_Vehicle())
103 car =
CarScript.Cast(player.GetCommand_Vehicle().GetTransport());
111 Error(
"[WARNING] m_Car and m_AnimSource are left for backwards compatibility to not crash mods that are using it, but should no longer be used.");
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
void ActionTarget(Object object, Object parent, int componentIndex, vector cursorHitPos, float utility, string surfaceName="")
void FillCommandUIDPerCrewIdx(int crewIdx0, int crewIdx1, int crewIdx2, int crewIdx3)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
int m_CommandUIDPerCrewIdx[4]
override void CreateConditionComponents()
override bool HasTarget()
void FillCommandUIDPerCrewIdx(int evenCrewIdx0, int unevenCrewIdx1)
override bool CanBeUsedInVehicle()
override void OnStartServer(ActionData action_data)
override void OnEndServer(ActionData action_data)
override void OnEnd(ActionData action_data)
void ActionInteractBase()
override int GetCarDoorsState(string slotType)
override string GetAnimSourceFromSelection(string selection)
override bool CanReachDoorsFromSeat(string pDoorsSelection, int pCurrentSeat)
Super root of all classes in Enforce script.
DayZPlayerConstants
defined in C++
void Error(string err)
Messagebox with error message.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.