1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-23 04:04:09 +01:00

Codechange: Use EnumBitSet for VehicleFlags. (#13793)

This commit is contained in:
Peter Nelson
2025-03-13 08:38:54 +00:00
committed by GitHub
parent dc343ca141
commit 8b39b23d2b
14 changed files with 83 additions and 81 deletions

View File

@@ -354,8 +354,8 @@ CommandCost CmdBuildAircraft(DoCommandFlags flags, TileIndex tile, const Engine
v->random_bits = Random();
u->random_bits = Random();
v->vehicle_flags = 0;
if (e->flags.Test(EngineFlag::ExclusivePreview)) SetBit(v->vehicle_flags, VF_BUILT_AS_PROTOTYPE);
v->vehicle_flags = {};
if (e->flags.Test(EngineFlag::ExclusivePreview)) v->vehicle_flags.Set(VehicleFlag::BuiltAsPrototype);
v->SetServiceIntervalIsPercent(Company::Get(_current_company)->settings.vehicle.servint_ispercent);
v->InvalidateNewGRFCacheOfChain();