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

Method GetEngine

src/vehicle.cpp:718–721  ·  view source on GitHub ↗

* Retrieves the engine of the vehicle. * @return Engine of the vehicle. * @pre HasEngineType() == true */

Source from the content-addressed store, hash-verified

716 * @pre HasEngineType() == true
717 */
718const Engine *Vehicle::GetEngine() const
719{
720 return Engine::Get(this->engine_type);
721}
722
723/**
724 * Retrieve the NewGRF the vehicle is tied to.

Callers 15

NeedsServicingMethod · 0.95
GetGRFMethod · 0.95
GetGRFIDMethod · 0.95
UpdateVisualEffectMethod · 0.95
ProcessConditionalOrderFunction · 0.45
GetImageMethod · 0.45
GetRunningCostMethod · 0.45
ConsistChangedMethod · 0.45
GetCursorImageOffsetMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected