mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-21 11:22:45 +01:00
Codechange: Use EnumBitSet for VehicleFlags. (#13793)
This commit is contained in:
@@ -727,8 +727,8 @@ static uint32_t VehicleGetVariable(Vehicle *v, const VehicleScopeResolver *objec
|
||||
if (powered && !has_power) SetBit(modflags, 6);
|
||||
if (HasBit(t->flags, VRF_TOGGLE_REVERSE)) SetBit(modflags, 8);
|
||||
}
|
||||
if (HasBit(v->vehicle_flags, VF_CARGO_UNLOADING)) SetBit(modflags, 1);
|
||||
if (HasBit(v->vehicle_flags, VF_BUILT_AS_PROTOTYPE)) SetBit(modflags, 10);
|
||||
if (v->vehicle_flags.Test(VehicleFlag::CargoUnloading)) SetBit(modflags, 1);
|
||||
if (v->vehicle_flags.Test(VehicleFlag::BuiltAsPrototype)) SetBit(modflags, 10);
|
||||
|
||||
return variable == 0xFE ? modflags : GB(modflags, 8, 8);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user