Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
cacontinuousrepeatstartengine.c
Go to the documentation of this file.
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 {
12 return UA_ERROR;
13 }
14
15 HumanCommandVehicle vehCommand = action_data.m_Player.GetCommand_Vehicle();
16 if( vehCommand )
17 {
18 Transport trans = vehCommand.GetTransport();
19
20 if ( trans )
21 {
22 Car car;
23 if ( Class.CastTo(car, trans) && car.EngineIsOn() )
24 {
25 return UA_FINISHED;
26 }
27 }
28 }
29
31 {
32 m_TimeElpased += action_data.m_Player.GetDeltaT();
33 m_TotalTimeElpased += action_data.m_Player.GetDeltaT();
34 return UA_PROCESSING;
35 }
36 else
37 {
40 m_TimeElpased = 0;
41 OnCompletePogress(action_data);
42 return UA_PROCESSING;
43 }
44 }
45};
void SetACData(Param units)
Definition cabase.c:40
ref Param1< float > m_SpentUnits
Super root of all classes in Enforce script.
Definition enscript.c:11
Native class for boats - handles physics simulation.
Definition boat.c:28
const int UA_FINISHED
Definition constants.c:466
const int UA_ERROR
Definition constants.c:485
const int UA_PROCESSING
Definition constants.c:464