DayZ
1.24
Loading...
Searching...
No Matches
CAContinuousRepeatStartEngine.c
Go to the documentation of this file.
1
class
CAContinuousRepeatStartEngine
:
CAContinuousRepeat
2
{
3
void
CAContinuousRepeatStartEngine
(
float
time_to_complete_action
)
4
{
5
m_DefaultTimeToComplete
=
time_to_complete_action
;
6
}
7
8
override
int
Execute
(
ActionData
action_data
)
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
26
if
(
m_TimeElpased
<
m_TimeToComplete
)
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
{
34
m_SpentUnits
.param1 =
m_TimeElpased
;
35
SetACData
(
m_SpentUnits
);
36
m_TimeElpased
= 0;
37
OnCompletePogress
(
action_data
);
38
return
UA_PROCESSING
;
39
}
40
}
41
};
ActionData
Definition
ActionBase.c:21
CABase::SetACData
void SetACData(Param units)
Definition
CABase.c:38
CAContinuousBase::OnCompletePogress
void OnCompletePogress(ActionData action_data)
Definition
CAContinuousBase.c:8
CAContinuousRepeat
Definition
CAContinuousRepeat.c:2
CAContinuousRepeat::m_TimeElpased
float m_TimeElpased
Definition
CAContinuousRepeat.c:3
CAContinuousRepeat::m_DefaultTimeToComplete
float m_DefaultTimeToComplete
Definition
CAContinuousRepeat.c:6
CAContinuousRepeat::m_TotalTimeElpased
float m_TotalTimeElpased
Definition
CAContinuousRepeat.c:4
CAContinuousRepeat::m_TimeToComplete
float m_TimeToComplete
Definition
CAContinuousRepeat.c:5
CAContinuousRepeat::m_SpentUnits
ref Param1< float > m_SpentUnits
Definition
CAContinuousRepeat.c:7
CAContinuousRepeatStartEngine
Definition
CAContinuousRepeatStartEngine.c:2
CAContinuousRepeatStartEngine::CAContinuousRepeatStartEngine
void CAContinuousRepeatStartEngine(float time_to_complete_action)
Definition
CAContinuousRepeatStartEngine.c:3
CAContinuousRepeatStartEngine::Execute
override int Execute(ActionData action_data)
Definition
CAContinuousRepeatStartEngine.c:8
Class
Super root of all classes in Enforce script.
Definition
EnScript.c:11
HumanCommandVehicle
Definition
human.c:685
Param3
Definition
EntityAI.c:95
Transport
Base native class for all motorized wheeled vehicles.
Definition
Car.c:75
Class::CastTo
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
UA_FINISHED
const int UA_FINISHED
Definition
constants.c:436
UA_ERROR
const int UA_ERROR
Definition
constants.c:455
UA_PROCESSING
const int UA_PROCESSING
Definition
constants.c:434
scripts
4_World
Classes
UserActionsComponent
ActionComponents
CAContinuousRepeatStartEngine.c
Generated by
1.10.0