Cleanup: Remove unnecessary VehicleRandomBits()

Simple Random() assignment to byte does the same.
This commit is contained in:
Peter Nelson
2023-04-23 21:22:17 +01:00
committed by PeterN
parent ca497ce356
commit 4a5e413a6c
7 changed files with 10 additions and 19 deletions

View File

@@ -656,7 +656,7 @@ static CommandCost CmdBuildRailWagon(DoCommandFlag flags, TileIndex tile, const
v->date_of_last_service = TimerGameCalendar::date;
v->build_year = TimerGameCalendar::year;
v->sprite_cache.sprite_seq.Set(SPR_IMG_QUERY);
v->random_bits = VehicleRandomBits();
v->random_bits = Random();
v->group_id = DEFAULT_GROUP;
@@ -721,7 +721,7 @@ static void AddRearEngineToMultiheadedTrain(Train *v)
u->date_of_last_service = v->date_of_last_service;
u->build_year = v->build_year;
u->sprite_cache.sprite_seq.Set(SPR_IMG_QUERY);
u->random_bits = VehicleRandomBits();
u->random_bits = Random();
v->SetMultiheaded();
u->SetMultiheaded();
v->SetNext(u);
@@ -786,7 +786,7 @@ CommandCost CmdBuildRailVehicle(DoCommandFlag flags, TileIndex tile, const Engin
v->date_of_last_service = TimerGameCalendar::date;
v->build_year = TimerGameCalendar::year;
v->sprite_cache.sprite_seq.Set(SPR_IMG_QUERY);
v->random_bits = VehicleRandomBits();
v->random_bits = Random();
if (e->flags & ENGINE_EXCLUSIVE_PREVIEW) SetBit(v->vehicle_flags, VF_BUILT_AS_PROTOTYPE);
v->SetServiceIntervalIsPercent(Company::Get(_current_company)->settings.vehicle.servint_ispercent);