Codechange: Split CT_INVALID into CT_INVALID and INVALID_CARGO.
INVALID_CARGO is a CargoID and should be used for most purposes in game. CT_INVALID is a CargoType used for defining default properties.
This commit is contained in:

committed by
Peter Nelson

parent
4fd986bd07
commit
952d111b94
@@ -1902,7 +1902,7 @@ bool CanBuildVehicleInfrastructure(VehicleType type, byte subtype)
|
||||
*/
|
||||
LiveryScheme GetEngineLiveryScheme(EngineID engine_type, EngineID parent_engine_type, const Vehicle *v)
|
||||
{
|
||||
CargoID cargo_type = v == nullptr ? (CargoID)CT_INVALID : v->cargo_type;
|
||||
CargoID cargo_type = v == nullptr ? INVALID_CARGO : v->cargo_type;
|
||||
const Engine *e = Engine::Get(engine_type);
|
||||
switch (e->type) {
|
||||
default: NOT_REACHED();
|
||||
|
Reference in New Issue
Block a user