* Check whether Vehicle::engine_type has any meaning. * @return true if the vehicle has a usable engine type. */
| 700 | * @return true if the vehicle has a usable engine type. |
| 701 | */ |
| 702 | bool Vehicle::HasEngineType() const |
| 703 | { |
| 704 | switch (this->type) { |
| 705 | case VEH_AIRCRAFT: return Aircraft::From(this)->IsNormalAircraft(); |
| 706 | case VEH_TRAIN: |
| 707 | case VEH_ROAD: |
| 708 | case VEH_SHIP: return true; |
| 709 | default: return false; |
| 710 | } |
| 711 | } |
| 712 | |
| 713 | /** |
| 714 | * Retrieves the engine of the vehicle. |
no test coverage detected