1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 01:04:50 +01:00

Name num_sheltered_sections flags

This commit is contained in:
Michael Steenbeek
2021-04-03 22:17:57 +02:00
committed by GitHub
parent ea961aed93
commit 7c73e271ad
4 changed files with 30 additions and 10 deletions

View File

@@ -1909,20 +1909,16 @@ void Vehicle::UpdateMeasurements()
{
curRide->testing_flags |= RIDE_TESTING_SHELTERED;
uint8_t numShelteredSections = curRide->num_sheltered_sections & 0x1F;
if (numShelteredSections != 0x1F)
numShelteredSections++;
curRide->num_sheltered_sections &= ~0x1F;
curRide->num_sheltered_sections |= numShelteredSections;
curRide->IncreaseNumShelteredSections();
if (vehicle_sprite_type != 0)
{
curRide->num_sheltered_sections |= (1 << 5);
curRide->num_sheltered_sections |= ShelteredSectionsBits::RotatingWhileSheltered;
}
if (bank_rotation != 0)
{
curRide->num_sheltered_sections |= (1 << 6);
curRide->num_sheltered_sections |= ShelteredSectionsBits::BankingWhileSheltered;
}
}