1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Add fallback for legacy objects

This commit is contained in:
Gymnasiast
2019-03-19 21:19:50 +01:00
parent 4f8548dfea
commit 59c74ead94

View File

@@ -85,6 +85,13 @@ void RideObject::ReadLegacy(IReadObjectContext* context, IStream* stream)
_presetColours.list[i] = stream->ReadValue<vehicle_colour>();
}
if (IsRideTypeShopOrFacility(_legacyType.ride_type[0]))
{
// This used to be hard-coded. JSON objects set this themselves.
_presetColours.count = 1;
_presetColours.list[0] = { COLOUR_BRIGHT_RED, COLOUR_BRIGHT_RED, COLOUR_BRIGHT_RED };
}
// Read peep loading positions
for (int32_t i = 0; i < RCT2_MAX_VEHICLES_PER_RIDE_ENTRY; i++)
{