OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Data Fields
GroundVehicleCache Struct Reference

Cached, frequently calculated values. More...

`#include <ground_vehicle.hpp>`

## Data Fields
uint32 | cached_weight
| Total weight of the consist (valid only for the first engine).
uint32 | cached_slope_resistance
| Resistance caused by weight when this vehicle part is at a slope.
uint32 | cached_max_te
| Maximum tractive effort of consist (valid only for the first engine).
uint16 | cached_axle_resistance
| Resistance caused by the axles of the vehicle (valid only for the first engine).
uint16 | cached_max_track_speed
| Maximum consist speed limited by track type (valid only for the first engine).
uint32 | cached_power
| Total power of the consist (valid only for the first engine).
uint32 | cached_air_drag
| Air drag coefficient of the vehicle (valid only for the first engine).
uint16 | cached_total_length
| Length of the whole vehicle (valid only for the first engine).
EngineID | first_engine
| Cached EngineID of the front vehicle. INVALID_ENGINE for the front vehicle itself.
uint8 | cached_veh_length
| Length of this vehicle in units of 1/VEHICLE_LENGTH of normal length. It is cached because this can be set by a callback.
uint16 | last_speed
| The last speed we did display, so we only have to redraw when this changes.

## Detailed Description

Cached, frequently calculated values.

All of these values except cached_slope_resistance are set only for the first part of a vehicle.

Definition at line 31 of file ground_vehicle.hpp.

The documentation for this struct was generated from the following file:

- src/ground_vehicle.hpp