DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс ActionCarDoorsOutside
+ Граф наследования:ActionCarDoorsOutside:

Защищенные члены

void ActionCarDoorsOutside ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnStartServer (ActionData action_data)
 
override void OnEndServer (ActionData action_data)
 
void FillCommandUIDPerCrewIdx (int crewIdx0, int crewIdx1, int crewIdx2, int crewIdx3)
 
void FillCommandUIDPerCrewIdx (int evenCrewIdx0, int unevenCrewIdx1)
 

Защищенные данные

int m_CommandUIDPerCrewIdx [4]
 
bool m_IsOpening = true
 

Подробное описание

Конструктор(ы)

◆ ActionCarDoorsOutside()

void ActionCarDoorsOutside ( )
inlineprotected
7 {
8 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_OPENDOORFW;
9 m_StanceMask = DayZPlayerConstants.STANCEMASK_ALL;
10 m_LockTargetOnUse = false;
11 }
bool m_LockTargetOnUse
Definition ActionBase.c:60
int m_StanceMask
Definition ActionBase.c:62
int m_CommandUID
Definition AnimatedActionBase.c:143
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Перекрестные ссылки AnimatedActionBase::m_CommandUID, ActionBase::m_LockTargetOnUse и ActionBase::m_StanceMask.

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprotected

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

20 {
22
25 {
26 return false;
27 }
28
30 if (Class.CastTo(car, target.GetParent()))
31 {
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 {
43 animSource = car.GetAnimSourceFromSelection(selections[i]);
44 if (animSource != "")
45 {
46 int idx = car.GetSeatIndexFromDoor(animSource);
47 if (idx != -1 && !car.IsAreaAtDoorFree(idx))
48 {
49 return false;
50 }
51
53 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_OPENDOORFW;
54
55 float animationPhase = car.GetAnimationPhase(animSource);
57 return (m_IsOpening && animationPhase <= 0.5 ) || ( !m_IsOpening && animationPhase > 0.5);
58 }
59 }
60 }
61 }
62
63 return false;
64 }
bool IsInReach(PlayerBase player, ActionTarget target, float maxDistance=1.0)
Definition ActionBase.c:1054
bool m_IsOpening
Definition ActionCarDoorsOutside.c:4
Definition InventoryItem.c:496
Definition CivilianSedan.c:2
Super root of all classes in Enforce script.
Definition EnScript.c:11
Definition EntityAI.c:95
Definition ActionConstants.c:106
const float DEFAULT
Definition ActionConstants.c:108
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки Class::CastTo(), UAMaxDistances::DEFAULT, ActionBase::IsInReach(), AnimatedActionBase::m_CommandUID и m_IsOpening.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprotected
14 {
17 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:64
ref CCTBase m_ConditionTarget
Definition ActionBase.c:65
Definition CCINone.c:2
Definition CCTNone.c:2

Перекрестные ссылки ActionBase::m_ConditionItem и ActionBase::m_ConditionTarget.

◆ FillCommandUIDPerCrewIdx() [1/2]

void FillCommandUIDPerCrewIdx ( int crewIdx0,
int crewIdx1,
int crewIdx2,
int crewIdx3 )
inlineprotected

◆ FillCommandUIDPerCrewIdx() [2/2]

void FillCommandUIDPerCrewIdx ( int evenCrewIdx0,
int unevenCrewIdx1 )
inlineprotected
130 {
132 }
void FillCommandUIDPerCrewIdx(int crewIdx0, int crewIdx1, int crewIdx2, int crewIdx3)
Definition ActionCarDoorsOutside.c:121

Перекрестные ссылки FillCommandUIDPerCrewIdx().

◆ OnEndServer()

override void OnEndServer ( ActionData action_data)
inlineprotected
110 {
111 super.OnEndServer(action_data);
112
113 CarScript car = CarScript.Cast(action_data.m_Target.GetParent());
114 if (car)
115 {
116 car.ForceUpdateLightsEnd();
117 }
118 }

◆ OnStartServer()

override void OnStartServer ( ActionData action_data)
inlineprotected
67 {
68 super.OnStartServer(action_data);
69
70 float phase;
71
72 if (m_IsOpening)
73 {
74 phase = 1.0;
75 }
76 else
77 {
78 phase = 0.0;
79 }
80
81 string animSource = "";
82
83 CarScript car = CarScript.Cast(action_data.m_Target.GetParent());
84 if (car)
85 {
87 CarDoor carDoor = CarDoor.Cast(action_data.m_Target.GetObject());
88 if (carDoor)
89 {
90 carDoor.GetActionComponentNameList(action_data.m_Target.GetComponentIndex(), selections);
91 for (int i = 0; i < selections.Count(); i++)
92 {
93 animSource = car.GetAnimSourceFromSelection(selections[i]);
94 if (animSource != "")
95 {
96 break;
97 }
98 }
99 }
100 }
101
102 if (car)
103 {
104 car.ForceUpdateLightsStart();
105 car.SetAnimationPhase(animSource, phase);
106 }
107 }

Перекрестные ссылки m_IsOpening.

Поля

◆ m_CommandUIDPerCrewIdx

int m_CommandUIDPerCrewIdx[4]
protected

Используется в FillCommandUIDPerCrewIdx().

◆ m_IsOpening


Объявления и описания членов класса находятся в файле: