DayZ 1.24
Loading...
Searching...
No Matches
CAContinuousRepeatStartEngine Class Reference
Inheritance diagram for CAContinuousRepeatStartEngine:
[legend]
Collaboration diagram for CAContinuousRepeatStartEngine:
[legend]

Private Member Functions

void CAContinuousRepeatStartEngine (float time_to_complete_action)
 
override int Execute (ActionData action_data)
 
- Private Member Functions inherited from CAContinuousRepeat
void CAContinuousRepeat (float time_to_complete_action)
 
override void Setup (ActionData action_data)
 
override int Execute (ActionData action_data)
 
override int Cancel (ActionData action_data)
 
override float GetProgress ()
 
void SetProgress (float value)
 

Additional Inherited Members

- Private Attributes inherited from CAContinuousRepeat
float m_TimeElpased
 
float m_TotalTimeElpased
 
float m_TimeToComplete
 
float m_DefaultTimeToComplete
 
ref Param1< floatm_SpentUnits
 

Detailed Description

Definition at line 1 of file CAContinuousRepeatStartEngine.c.

Constructor & Destructor Documentation

◆ CAContinuousRepeatStartEngine()

void CAContinuousRepeatStartEngine::CAContinuousRepeatStartEngine ( float time_to_complete_action)
inlineprivate

Member Function Documentation

◆ Execute()

override int CAContinuousRepeatStartEngine::Execute ( ActionData action_data)
inlineprivate

Definition at line 8 of file CAContinuousRepeatStartEngine.c.

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 }
void SetACData(Param units)
Definition CABase.c:38
void OnCompletePogress(ActionData action_data)
ref Param1< float > m_SpentUnits
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

References Class::CastTo(), CAContinuousRepeat::m_SpentUnits, CAContinuousRepeat::m_TimeElpased, CAContinuousRepeat::m_TimeToComplete, CAContinuousRepeat::m_TotalTimeElpased, CAContinuousBase::OnCompletePogress(), CABase::SetACData(), UA_ERROR, UA_FINISHED, and UA_PROCESSING.


The documentation for this class was generated from the following file: