Codechange: Use EnumBitSet for EngineMiscFlags.
This commit is contained in:
committed by
Peter Nelson
parent
5664b1e2f6
commit
6c4ddb242a
+1
-1
@@ -386,7 +386,7 @@ static std::tuple<CommandCost, uint, uint16_t, CargoArray> RefitVehicle(Vehicle
|
||||
|
||||
/* If the vehicle is not refittable, or does not allow automatic refitting,
|
||||
* count its capacity nevertheless if the cargo matches */
|
||||
bool refittable = HasBit(e->info.refit_mask, new_cargo_type) && (!auto_refit || HasBit(e->info.misc_flags, EF_AUTO_REFIT));
|
||||
bool refittable = HasBit(e->info.refit_mask, new_cargo_type) && (!auto_refit || e->info.misc_flags.Test(EngineMiscFlag::AutoRefit));
|
||||
if (!refittable && v->cargo_type != new_cargo_type) {
|
||||
uint amount = e->DetermineCapacity(v, nullptr);
|
||||
if (amount > 0) cargo_capacities[v->cargo_type] += amount;
|
||||
|
||||
Reference in New Issue
Block a user