mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-24 20:12:42 +00:00
Codechange: use EnumBitSet for CargoTypes
This commit is contained in:
committed by
Peter Nelson
parent
962a550d1b
commit
c45aa3c9b6
@@ -479,7 +479,7 @@ static uint32_t VehicleGetVariable(Vehicle *v, const VehicleScopeResolver *objec
|
||||
}
|
||||
|
||||
/* The cargo translation is specific to the accessing GRF, and thus cannot be cached. */
|
||||
CargoType common_cargo_type = (v->grf_cache.consist_cargo_information >> 8) & 0xFF;
|
||||
CargoType common_cargo_type = static_cast<CargoType>(GB(v->grf_cache.consist_cargo_information, 8, 8));
|
||||
|
||||
/* Note:
|
||||
* - Unlike everywhere else the cargo translation table is only used since grf version 8, not 7.
|
||||
|
||||
Reference in New Issue
Block a user