DayZ 1.24
Loading...
Searching...
No Matches
CAContinuousRepeatStartEngine.c
Go to the documentation of this file.
2{
7
9 {
10 if (!action_data.m_Player)
11 return UA_ERROR;
12
13 HumanCommandVehicle vehCommand = action_data.m_Player.GetCommand_Vehicle();
14 if (vehCommand)
15 {
16 Transport trans = vehCommand.GetTransport();
17
18 if (trans)
19 {
20 Car car;
21 if (Class.CastTo(car, trans) && car.EngineIsOn())
22 return UA_FINISHED;
23 }
24 }
25
27 {
28 m_TimeElpased += action_data.m_Player.GetDeltaT();
29 m_TotalTimeElpased += action_data.m_Player.GetDeltaT();
30 return UA_PROCESSING;
31 }
32 else
33 {
36 m_TimeElpased = 0;
38 return UA_PROCESSING;
39 }
40 }
41};
void SetACData(Param units)
Definition CABase.c:38
void OnCompletePogress(ActionData action_data)
ref Param1< float > m_SpentUnits
void CAContinuousRepeatStartEngine(float time_to_complete_action)
override int Execute(ActionData action_data)
Super root of all classes in Enforce script.
Definition EnScript.c:11
Base native class for all motorized wheeled vehicles.
Definition Car.c:75
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
const int UA_FINISHED
Definition constants.c:436
const int UA_ERROR
Definition constants.c:455
const int UA_PROCESSING
Definition constants.c:434