Fix #8739: savegame from original game crashes when cruising through map (#8746)

This commit is contained in:
Ted John 2019-02-24 23:23:41 +00:00 committed by GitHub
parent a6e7041f49
commit 08508cc638
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 7 deletions

View File

@ -71,6 +71,7 @@
- Fix: [#8647] Marketing campaigns check for entry fees below £1 (original bug).
- Fix: [#8653] Crash when peeps attempt to enter a ride with no vehicles.
- Fix: [#8720] Desync due to boats colliding with ghost pieces.
- Fix: [#8739] Savegame from original game crashes when cruising through map.
- Fix: [#8742] Access violation in vehicle_update_sound_params.
- Improved: [#2940] Allow mouse-dragging to set patrol area (Singleplayer only).
- Improved: [#7730] Draw extreme vertical and lateral Gs red in the ride window's graph tab.

View File

@ -3075,8 +3075,6 @@ void vehicle_visual_splash_effect(
{
switch (vehicleEntry->effect_visual)
{
case 1: /* nullsub */
break;
case VEHICLE_VISUAL_SPLASH1_EFFECT:
vehicle_visual_splash1_effect(session, z, vehicle);
break;
@ -3092,9 +3090,6 @@ void vehicle_visual_splash_effect(
case VEHICLE_VISUAL_SPLASH5_EFFECT:
vehicle_visual_splash5_effect(session, z, vehicle);
break;
default:
assert(false);
break;
}
}
@ -3143,13 +3138,19 @@ void vehicle_paint(paint_session* session, const rct_vehicle* vehicle, int32_t i
{
return;
}
vehicleEntry = &rideEntry->vehicles[vehicle->vehicle_type];
auto vehicleEntryIndex = vehicle->vehicle_type;
if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)
{
vehicleEntry++;
vehicleEntryIndex++;
z += 16;
}
if (vehicleEntryIndex >= std::size(rideEntry->vehicles))
{
return;
}
vehicleEntry = &rideEntry->vehicles[vehicleEntryIndex];
}
switch (vehicleEntry->car_visual)