Codechange: Use EnumBitSet for VehStates. (#13755)

Renamed from VehStatus because pluralising that is weird.
This commit is contained in:
Peter Nelson
2025-03-08 18:24:21 +00:00
committed by GitHub
parent 0b102db421
commit 91d22f7617
37 changed files with 199 additions and 206 deletions

View File

@@ -3728,7 +3728,7 @@ static VehicleEnterTileStatus VehicleEnter_Station(Vehicle *v, TileIndex tile, i
if (x == stop) {
return VETSB_ENTERED_STATION | static_cast<VehicleEnterTileStatus>(station_id.base() << VETS_STATION_ID_OFFSET); // enter station
} else if (x < stop) {
v->vehstatus |= VS_TRAIN_SLOWING;
v->vehstatus.Set(VehState::TrainSlowing);
uint16_t spd = std::max(0, (stop - x) * 20 - 15);
if (spd < v->cur_speed) v->cur_speed = spd;
}