3 protected int m_CommandUIDPerCrewIdx[4];
4 protected bool m_IsOpening =
true;
13 override void CreateConditionComponents()
30 if (
Class.CastTo(car, target.GetParent()))
37 carDoor.GetActionComponentNameList(target.GetComponentIndex(), selections);
39 string animSource =
"";
41 for (
int i = 0; i < selections.Count(); i++)
43 animSource = car.GetAnimSourceFromSelection(selections[i]);
46 int idx = car.GetSeatIndexFromDoor(animSource);
47 if (idx != -1 && !car.IsAreaAtDoorFree(idx))
55 float animationPhase = car.GetAnimationPhase(animSource);
57 return (m_IsOpening && animationPhase <= 0.5 ) || ( !m_IsOpening && animationPhase > 0.5);
66 override void OnStartServer(
ActionData action_data )
79 string animSource =
"";
88 carDoor.GetActionComponentNameList(action_data.m_Target.GetComponentIndex(), selections);
89 for (
int i = 0; i < selections.Count(); i++)
91 animSource = car.GetAnimSourceFromSelection(selections[i]);
102 car.ForceUpdateLightsStart();
103 car.SetAnimationPhase(animSource, phase);
107 override void OnEndServer(
ActionData action_data)
112 car.ForceUpdateLightsEnd();
117 protected void FillCommandUIDPerCrewIdx(
int crewIdx0,
int crewIdx1,
int crewIdx2,
int crewIdx3)
119 m_CommandUIDPerCrewIdx[0] = crewIdx0;
120 m_CommandUIDPerCrewIdx[1] = crewIdx1;
121 m_CommandUIDPerCrewIdx[2] = crewIdx2;
122 m_CommandUIDPerCrewIdx[3] = crewIdx3;
125 protected void FillCommandUIDPerCrewIdx(
int evenCrewIdx0,
int unevenCrewIdx1)
127 FillCommandUIDPerCrewIdx(evenCrewIdx0, unevenCrewIdx1, evenCrewIdx0, unevenCrewIdx1);