| 1773 | } |
| 1774 | |
| 1775 | uint16_t RoadVehicle::GetMaxWeight() const |
| 1776 | { |
| 1777 | uint16_t weight = CargoSpec::Get(this->cargo_type)->WeightOfNUnits(this->GetEngine()->DetermineCapacity(this)); |
| 1778 | |
| 1779 | /* Vehicle weight is not added for articulated parts. */ |
| 1780 | if (!this->IsArticulatedPart()) { |
| 1781 | /* Road vehicle weight is in units of 1/4 t. */ |
| 1782 | weight += GetVehicleProperty(this, PROP_ROADVEH_WEIGHT, RoadVehInfo(this->engine_type)->weight) / 4; |
| 1783 | } |
| 1784 | |
| 1785 | return weight; |
| 1786 | } |
nothing calls this directly
no test coverage detected