1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 04:23:20 +01:00

Clean up two hardcoded vehicle maxes

This commit is contained in:
Michael Steenbeek
2022-01-05 14:16:16 +01:00
committed by GitHub
parent b4f264fe4d
commit ca27c2181b
2 changed files with 3 additions and 3 deletions

View File

@@ -3127,7 +3127,7 @@ static Vehicle* vehicle_create_car(
vehicle->bank_rotation = 0;
vehicle->target_seat_rotation = 4;
vehicle->seat_rotation = 4;
for (int32_t i = 0; i < 32; i++)
for (size_t i = 0; i < std::size(vehicle->peep); i++)
{
vehicle->peep[i] = SPRITE_INDEX_NULL;
}

View File

@@ -6131,8 +6131,8 @@ void Vehicle::SetMapToolbar() const
{
const Vehicle* vehicle = GetHead();
int32_t vehicleIndex;
for (vehicleIndex = 0; vehicleIndex < 32; vehicleIndex++)
size_t vehicleIndex;
for (vehicleIndex = 0; vehicleIndex < std::size(curRide->vehicles); vehicleIndex++)
if (curRide->vehicles[vehicleIndex] == vehicle->sprite_index)
break;