Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_EngineHitZoneInfo.c
Go to the documentation of this file.
2 {
3  protected CarControllerComponent m_pCarController;
4  protected CarControllerComponent_SA m_pCarController_SA;
5 
6  //------------------------------------------------------------------------------------------------
8  override EVehicleInfoState GetState()
9  {
10  EVehicleInfoState state = super.GetState();
11 
13  {
14  if (!m_pCarController)
15  return state;
16 
17  if (m_pCarController.GetEngineDrowned())
18  state = EVehicleInfoState.ERROR;
19 
20  VehicleWheeledSimulation simulation = m_pCarController.GetSimulation();
21  if (state == EVehicleInfoState.ERROR && simulation && simulation.GetThrottle() > 0.1)
22  m_bIsBlinking = true;
23 
24  return state;
25  }
26  else
27  {
28  if (!m_pCarController_SA)
29  return state;
30 
31  if (m_pCarController_SA.GetEngineDrowned())
32  state = EVehicleInfoState.ERROR;
33 
34  VehicleWheeledSimulation_SA simulation = m_pCarController_SA.GetSimulation();
35  if (state == EVehicleInfoState.ERROR && simulation && simulation.GetThrottle() > 0.1)
36  m_bIsBlinking = true;
37 
38  return state;
39  }
40  }
41 
42  //------------------------------------------------------------------------------------------------
44  override void DisplayInit(IEntity owner)
45  {
46  super.DisplayInit(owner);
47 
49  m_pCarController = CarControllerComponent.Cast(owner.FindComponent(CarControllerComponent));
50  else
51  m_pCarController_SA = CarControllerComponent_SA.Cast(owner.FindComponent(CarControllerComponent_SA));
52  }
53 };
SCR_HitZoneInfo
Definition: SCR_HitZoneInfo.c:4
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
GetIsClientAuthority
override bool GetIsClientAuthority()
Definition: game.c:268
SCR_EngineHitZoneInfo
Definition: SCR_EngineHitZoneInfo.c:1
EVehicleInfoState
EVehicleInfoState
UI indicator state, controlling colors and opacity.
Definition: SCR_BaseVehicleInfo.c:5