* Returns the tractive effort of the engine for display purposes. * For dual-headed train-engines this is the tractive effort of both heads * @return tractive effort in display units kN */
| 423 | * @return tractive effort in display units kN |
| 424 | */ |
| 425 | uint Engine::GetDisplayMaxTractiveEffort() const |
| 426 | { |
| 427 | /* Only trains and road vehicles have 'tractive effort'. */ |
| 428 | switch (this->type) { |
| 429 | case VEH_TRAIN: |
| 430 | return (GROUND_ACCELERATION * this->GetDisplayWeight() * GetEngineProperty(this->index, PROP_TRAIN_TRACTIVE_EFFORT, this->VehInfo<RailVehicleInfo>().tractive_effort)) / 256; |
| 431 | case VEH_ROAD: |
| 432 | return (GROUND_ACCELERATION * this->GetDisplayWeight() * GetEngineProperty(this->index, PROP_ROADVEH_TRACTIVE_EFFORT, this->VehInfo<RoadVehicleInfo>().tractive_effort)) / 256; |
| 433 | |
| 434 | default: NOT_REACHED(); |
| 435 | } |
| 436 | } |
| 437 | |
| 438 | /** |
| 439 | * Returns the vehicle's (not model's!) life length in days. |
no test coverage detected