DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс ActionCarHornBase

Защищенные статические члены

static bool PlayerIsDriver (Transport trans, PlayerBase player)
 
static bool BatteryIsVital (ItemBase battery)
 

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

static bool ActionCondition (PlayerBase player)
 
static void SetCarHornState (CarHornActionData pActionData, int pState)
 

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

Методы

◆ ActionCondition()

static bool ActionCondition ( PlayerBase player)
inlinestaticprivate
4 {
5 HumanCommandVehicle vehCommand = player.GetCommand_Vehicle();
6
7 if (vehCommand)
8 {
9 Transport trans = vehCommand.GetTransport();
10 if (trans)
11 {
13 {
14 return false;
15 }
16
18 if (Class.CastTo(car, trans))
19 {
20 return BatteryIsVital(car.GetBattery());
21 }
22 }
23 }
24
25 return false;
26 }
static bool BatteryIsVital(ItemBase battery)
Definition ActionCarHorn.c:44
static bool PlayerIsDriver(Transport trans, PlayerBase player)
Definition ActionCarHorn.c:39
Definition CivilianSedan.c:2
Super root of all classes in Enforce script.
Definition EnScript.c:11
Definition human.c:690
Definition EntityAI.c:95
Base native class for all motorized wheeled vehicles.
Definition Boat.c:28
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки BatteryIsVital(), Class::CastTo() и PlayerIsDriver().

Используется в ActionCondition() и ActionCarHornLong::ActionCondition().

◆ BatteryIsVital()

static bool BatteryIsVital ( ItemBase battery)
inlinestaticprotected
45 {
46 return battery && battery.GetHealthLevel("Health") <= GameConstants.STATE_DAMAGED;
47 }
Definition constants.c:638
const int STATE_DAMAGED
Definition constants.c:809

Перекрестные ссылки GameConstants::STATE_DAMAGED.

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

◆ PlayerIsDriver()

static bool PlayerIsDriver ( Transport trans,
PlayerBase player )
inlinestaticprotected
40 {
41 return trans.GetSeatAnimationType(trans.CrewMemberIndex(player)) == DayZPlayerConstants.VEHICLESEAT_DRIVER;
42 }
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

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

◆ SetCarHornState()

static void SetCarHornState ( CarHornActionData pActionData,
int pState )
inlinestaticprivate
29 {
30 if (!pActionData.m_Player)
31 return;
32
33 if (!pActionData.m_Car)
34 return;
35
36 pActionData.m_Car.SetCarHornState(pState);
37 }

Используется в OnEndInput(), ActionCarHornLong::OnEndInput(), OnEndServer(), ActionCarHornLong::OnEndServer(), OnStartServer() и ActionCarHornLong::OnStartServer().


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