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

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

float GetDirectionDot (Object target, EntityAI player)
 

Закрытые члены

void ActionPushCar ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override ActionData CreateActionData ()
 
override void OnStartServer (ActionData action_data)
 
override void OnEndServer (ActionData action_data)
 
CarScript GetCar (ActionTarget target)
 DEPRECATED.
 
- Закрытые члены унаследованные от ActionPushObject
Object GetPushObject (ActionTarget target)
 

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

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

◆ ActionPushCar()

void ActionPushCar ( )
inlineprivate
46 {
48 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_VEHICLE_PUSH;
49 m_FullBody = true;
50 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
51
52 m_Text = "#push_car";
53 }
int m_StanceMask
Definition ActionBase.c:33
bool m_FullBody
Definition ActionBase.c:61
string m_Text
Definition ActionBase.c:58
int m_CommandUID
Definition AnimatedActionBase.c:143
m_CallbackClass
Definition AnimatedActionBase.c:145
Definition EntityAI.c:95
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

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

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
56 {
57 if (!super.ActionCondition(player, target, item))
58 return false;
59
61 return false;
62
63 return true;
64 }
bool IsInReach(PlayerBase player, ActionTarget target, float maxDistance=1.0)
Definition ActionBase.c:1054
Definition ActionConstants.c:106
const float SMALL
Definition ActionConstants.c:107

Перекрестные ссылки ActionBase::IsInReach() и UAMaxDistances::SMALL.

◆ CreateActionData()

override ActionData CreateActionData ( )
inlineprivate
67 {
68 ActionPushObjectData data = new ActionPushCarData();
69 return data;
70 }
Definition ActionPushCar.c:2

◆ GetCar()

CarScript GetCar ( ActionTarget target)
inlineprivate

DEPRECATED.

108 {
109 return CarScript.Cast(GetPushObject(target));
110 }
Object GetPushObject(ActionTarget target)
Definition ActionPushObject.c:199
Definition CivilianSedan.c:2

Перекрестные ссылки ActionPushObject::GetPushObject().

◆ GetDirectionDot()

float GetDirectionDot ( Object target,
EntityAI player )
inlineprotected
102 {
103 return vector.Dot(target.GetDirection(), player.GetDirection());
104 }
Definition EnConvert.c:106
static float Dot(vector v1, vector v2)
Returns Dot product of vector v1 and vector v2.
Definition EnConvert.c:271

Перекрестные ссылки vector::Dot().

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

◆ OnEndServer()

override void OnEndServer ( ActionData action_data)
inlineprivate
92 {
93 super.OnEndServer(action_data);
94
95 ActionPushObjectData data = ActionPushObjectData.Cast(action_data);
96 Car carObj = Car.Cast(data.m_Object);
97 if (carObj)
98 carObj.SetBrakesActivateWithoutDriver(true);
99 }

◆ OnStartServer()

override void OnStartServer ( ActionData action_data)
inlineprivate
73 {
74 super.OnStartServer(action_data);
75
77 Car carObj = Car.Cast(data.m_Object);
78 if (carObj)
79 {
80 carObj.SetBrake(0.0);
81 carObj.SetHandbrake(0.0);
82 carObj.SetBrakesActivateWithoutDriver(false);
83 }
84
85 data.m_PushDirection = -1;
86 if (GetDirectionDot(data.m_Object, data.m_Player) > 0)
87 data.m_PushDirection = 1;
88
89 }
float GetDirectionDot(Object target, EntityAI player)
Definition ActionPushCar.c:101

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


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