reach check from outside of car
player is outside of vehicle
player is looking at one of the doors, can't open if obstructed
if player is in car and cannot reach doors
is in reach, should open the door
См. определение в файле ActionCarDoorsOutside.c строка 19
20 {
22
24 if (!
IsInReach(player, target, UAMaxDistances.DEFAULT))
25 {
26 return false;
27 }
28
30 if (Class.CastTo(car, target.GetParent()))
31 {
32 array<string> selections = new array<string>();
33
34 CarDoor carDoor = CarDoor.Cast(target.GetObject());
35 if (carDoor)
36 {
37 carDoor.GetActionComponentNameList(target.GetComponentIndex(), selections);
38
39 string animSource = "";
40
41 for (int i = 0; i < selections.Count(); i++)
42 {
44 if (animSource != "")
45 {
47 if (idx != -1 && !car.IsAreaAtDoorFree(idx))
48 {
49 return false;
50 }
51
54
55 float animationPhase = car.GetAnimationPhase(animSource);
58 }
59 }
60 }
61 }
62
63 return false;
64 }
bool IsInReach(PlayerBase player, ActionTarget target, float maxDistance=1.0)
override int GetSeatIndexFromDoor(string pDoorSelection)
override string GetAnimSourceFromSelection(string selection)
DayZPlayerConstants
defined in C++
Перекрестные ссылки ActionTarget, Class::CastTo(), UAMaxDistances::DEFAULT, CarScript::GetAnimSourceFromSelection(), CarScript::GetSeatIndexFromDoor(), ActionBase::IsInReach(), AnimatedActionBase::m_CommandUID и m_IsOpening.