MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetGroundVehicleCache

Method GetGroundVehicleCache

src/vehicle.cpp:3143–3151  ·  view source on GitHub ↗

* Access the ground vehicle cache of the vehicle. * @pre The vehicle is a #GroundVehicle. * @return #GroundVehicleCache of the vehicle. */

Source from the content-addressed store, hash-verified

3141 * @return #GroundVehicleCache of the vehicle.
3142 */
3143GroundVehicleCache *Vehicle::GetGroundVehicleCache()
3144{
3145 assert(this->IsGroundVehicle());
3146 if (this->type == VEH_TRAIN) {
3147 return &Train::From(this)->gcache;
3148 } else {
3149 return &RoadVehicle::From(this)->gcache;
3150 }
3151}
3152
3153/**
3154 * Access the ground vehicle cache of the vehicle.

Callers 9

AddArticulatedPartsFunction · 0.80
GetVehiclePaletteFunction · 0.80
UpdateLoadUnloadTicksFunction · 0.80
VehicleLengthSorterFunction · 0.80
DrawWidgetMethod · 0.80
LiveryHelperFunction · 0.80
VehicleResolverObjectMethod · 0.80
GetLengthMethod · 0.80
AfterLoadVehiclesPhase1Function · 0.80

Calls 1

IsGroundVehicleMethod · 0.95

Tested by

no test coverage detected