Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_FuelConsumptionComponent.c File Reference

Go to the source code of this file.

Data Structures

class  SCR_FuelConsumptionComponentClass
 

Functions

void SetCurrentFuelTank (int iFuelTankID)
 
BaseFuelNode GetCurrentFuelTank ()
 
protected BaseFuelNode FindFuelTankByID (int iFuelTankID)
 
private BaseFuelNode FindNonEmptyFuelTank ()
 
void SetEnabled (bool enabled)
 
void Update ()
 updates currently active fueltank to see if it can still be used. turns off engine if no usable fueltanks are present. More...
 
protected void ConnectToFuelConsumptionSystem ()
 
protected void DisconnectFromFuelConsumptionSystem ()
 
void Update (float timeSlice)
 
override void OnPostInit (IEntity owner)
 Called on PostInit when all components are added. More...
 
override void EOnInit (IEntity owner)
 
override void OnDelete (IEntity owner)
 

Variables

SCR_FuelConsumptionComponentClass SECOND_TO_HOUR = 1/3600
 
const protected float MIN_FUEL = 0
 
const protected float MIN_THRUST = 0.04
 
const protected float MIN_CLUTCH = 0.04
 
const protected float NEUTRAL_GEAR = 1
 
const protected float TIME_STEP = 1
 
protected bool m_bConnectedToSystem = false
 
protected float m_fTimeDelta
 
protected BaseFuelNode m_CurrentFuelTank
 
protected VehicleBaseSimulation m_Simulation
 
protected SCR_FuelConsumptionComponentClass m_ComponentData
 

Function Documentation

◆ ConnectToFuelConsumptionSystem()

protected void ConnectToFuelConsumptionSystem ( )

Definition at line 290 of file SCR_FuelConsumptionComponent.c.

◆ DisconnectFromFuelConsumptionSystem()

protected void DisconnectFromFuelConsumptionSystem ( )

Definition at line 302 of file SCR_FuelConsumptionComponent.c.

◆ FindFuelTankByID()

protected BaseFuelNode FindFuelTankByID ( int  iFuelTankID)

returns the fuel tank pointer by the given FuelTankID

Parameters
[in]iFuelTankID
Returns

Definition at line 79 of file SCR_FuelConsumptionComponent.c.

◆ FindNonEmptyFuelTank()

private BaseFuelNode FindNonEmptyFuelTank ( )
Returns
the pointer of the first fuel tank with enough fuel (the fuel tank which is dedicated to the vehicle, not its cistern, cargo...)

Definition at line 101 of file SCR_FuelConsumptionComponent.c.

◆ GetCurrentFuelTank()

BaseFuelNode GetCurrentFuelTank ( )
Returns

Definition at line 70 of file SCR_FuelConsumptionComponent.c.

◆ SetCurrentFuelTank()

void SetCurrentFuelTank ( int  iFuelTankID)

Switch the actual fuel tank (i.e. by a switch on the dashboard)

Parameters
[in]iFuelTankID

Definition at line 63 of file SCR_FuelConsumptionComponent.c.

◆ SetEnabled()

void SetEnabled ( bool  enabled)
Parameters
[in]enabled

Definition at line 120 of file SCR_FuelConsumptionComponent.c.

◆ Update()

void Update ( float  timeSlice)
Parameters
[in]timeSlice

Definition at line 318 of file SCR_FuelConsumptionComponent.c.

Variable Documentation

◆ m_bConnectedToSystem

protected bool m_bConnectedToSystem = false

Definition at line 23 of file SCR_FuelConsumptionComponent.c.

◆ m_ComponentData

protected SCR_FuelConsumptionComponentClass m_ComponentData

Definition at line 28 of file SCR_FuelConsumptionComponent.c.

◆ m_CurrentFuelTank

protected BaseFuelNode m_CurrentFuelTank

Definition at line 26 of file SCR_FuelConsumptionComponent.c.

◆ m_fTimeDelta

protected float m_fTimeDelta

Definition at line 25 of file SCR_FuelConsumptionComponent.c.

◆ m_Simulation

protected VehicleBaseSimulation m_Simulation

Definition at line 27 of file SCR_FuelConsumptionComponent.c.

◆ MIN_CLUTCH

const protected float MIN_CLUTCH = 0.04

Definition at line 19 of file SCR_FuelConsumptionComponent.c.

◆ MIN_FUEL

const protected float MIN_FUEL = 0

Definition at line 17 of file SCR_FuelConsumptionComponent.c.

◆ MIN_THRUST

const protected float MIN_THRUST = 0.04

Definition at line 18 of file SCR_FuelConsumptionComponent.c.

◆ NEUTRAL_GEAR

const protected float NEUTRAL_GEAR = 1

Definition at line 20 of file SCR_FuelConsumptionComponent.c.

◆ SECOND_TO_HOUR

SCR_FuelConsumptionComponentClass SECOND_TO_HOUR = 1/3600

◆ TIME_STEP

const protected float TIME_STEP = 1

Definition at line 21 of file SCR_FuelConsumptionComponent.c.