diff --git a/src/articulated_vehicles.cpp b/src/articulated_vehicles.cpp --- a/src/articulated_vehicles.cpp +++ b/src/articulated_vehicles.cpp @@ -107,7 +107,7 @@ uint CountArticulatedParts(EngineID engi static inline uint16_t GetVehicleDefaultCapacity(EngineID engine, CargoID *cargo_type) { const Engine *e = Engine::Get(engine); - CargoID cargo = (e->CanCarryCargo() ? e->GetDefaultCargoType() : (CargoID)CT_INVALID); + CargoID cargo = (e->CanCarryCargo() ? e->GetDefaultCargoType() : INVALID_CARGO); if (cargo_type != nullptr) *cargo_type = cargo; if (!IsValidCargoID(cargo)) return 0; return e->GetDisplayDefaultCapacity(); @@ -259,13 +259,13 @@ CargoTypes GetUnionOfArticulatedRefitMas * Get cargo mask of all cargoes carried by an articulated vehicle. * Note: Vehicles not carrying anything are ignored * @param v the first vehicle in the chain - * @param cargo_type returns the common CargoID if needed. (CT_INVALID if no part is carrying something or they are carrying different things) + * @param cargo_type returns the common CargoID if needed. (INVALID_CARGO if no part is carrying something or they are carrying different things) * @return cargo mask, may be 0 if the no vehicle parts have cargo capacity */ CargoTypes GetCargoTypesOfArticulatedVehicle(const Vehicle *v, CargoID *cargo_type) { CargoTypes cargoes = 0; - CargoID first_cargo = CT_INVALID; + CargoID first_cargo = INVALID_CARGO; do { if (IsValidCargoID(v->cargo_type) && v->GetEngine()->CanCarryCargo()) { @@ -273,7 +273,7 @@ CargoTypes GetCargoTypesOfArticulatedVeh if (!IsValidCargoID(first_cargo)) first_cargo = v->cargo_type; if (first_cargo != v->cargo_type) { if (cargo_type != nullptr) { - *cargo_type = CT_INVALID; + *cargo_type = INVALID_CARGO; cargo_type = nullptr; } }