* Calculates the maximum weight of the ground vehicle when loaded. * @return Weight in tonnes */
| 3230 | * @return Weight in tonnes |
| 3231 | */ |
| 3232 | uint32_t Vehicle::GetDisplayMaxWeight() const |
| 3233 | { |
| 3234 | uint32_t max_weight = 0; |
| 3235 | |
| 3236 | for (const Vehicle *u = this; u != nullptr; u = u->Next()) { |
| 3237 | max_weight += u->GetMaxWeight(); |
| 3238 | } |
| 3239 | |
| 3240 | return max_weight; |
| 3241 | } |
| 3242 | |
| 3243 | /** |
| 3244 | * Calculates the minimum power-to-weight ratio using the maximum weight of the ground vehicle |
nothing calls this directly
no test coverage detected