Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_GearboxHitZoneInfo.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 || m_pCarController.GetCurrentGear() == 1)
15  return state;
16 
17  if (state != EVehicleInfoState.ERROR)
18  return state;
19 
20  VehicleWheeledSimulation simulation = m_pCarController.GetSimulation();
21  if (simulation && simulation.GetSpeedKmh() > 1)
22  m_bIsBlinking = true;
23 
24  return state;
25  }
26  else
27  {
28  if (!m_pCarController_SA || m_pCarController_SA.GetCurrentGear() == 1)
29  return state;
30 
31  if (state != EVehicleInfoState.ERROR)
32  return state;
33 
34  VehicleWheeledSimulation_SA simulation = m_pCarController_SA.GetSimulation();
35  if (simulation && simulation.GetSpeedKmh() > 1)
36  m_bIsBlinking = true;
37 
38  return state;
39  }
40 
41  }
42 
43  //------------------------------------------------------------------------------------------------
45  override void DisplayInit(IEntity owner)
46  {
47  super.DisplayInit(owner);
48 
50  m_pCarController = CarControllerComponent.Cast(owner.FindComponent(CarControllerComponent));
51  else
52  m_pCarController_SA = CarControllerComponent_SA.Cast(owner.FindComponent(CarControllerComponent_SA));
53  }
54 };
SCR_HitZoneInfo
Definition: SCR_HitZoneInfo.c:4
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
GetIsClientAuthority
override bool GetIsClientAuthority()
Definition: game.c:268
SCR_GearboxHitZoneInfo
Definition: SCR_GearboxHitZoneInfo.c:1
EVehicleInfoState
EVehicleInfoState
UI indicator state, controlling colors and opacity.
Definition: SCR_BaseVehicleInfo.c:5