Fix #7854: Cannot build custom Spiral RC; dummy entries in track designs list (#10814)

This commit is contained in:
Michael Steenbeek 2020-02-22 19:06:57 +01:00 committed by GitHub
parent e16a53df1d
commit 86c7dbf1d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 9 deletions

View File

@ -10,6 +10,8 @@
- Change: [#1164] Use available translations for shortcut key bindings.
- Fix: [#5249] No collision detection when building ride entrance at heights > 85.5m.
- Fix: [#7784] Vehicle tab takes 1st car colour instead of tab_vehicle's colour.
- Fix: [#7854] Cannot build a custom spiral roller coaster design.
- Fix: [#7854] Empty entries in spiral roller coaster designs list.
- Fix: [#8875] RCT1 competition scenarios are classified incorrectly.
- Fix: [#10176] Mistake in the sprite for the land tool's 6x6 grid.
- Fix: [#10196] Doors unable to be placed at end of track corners.

View File

@ -239,13 +239,6 @@ static void window_track_list_close(rct_window* w)
*/
static void window_track_list_select(rct_window* w, int32_t listIndex)
{
// Displays a message if the ride can't load, fix #4080
if (_loadedTrackDesign == nullptr)
{
context_show_error(STR_CANT_BUILD_PARK_ENTRANCE_HERE, STR_TRACK_LOAD_FAILED_ERROR);
return;
}
audio_play_sound(SoundId::Click1, 0, w->x + (w->width / 2));
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER))
{
@ -258,7 +251,14 @@ static void window_track_list_select(rct_window* w, int32_t listIndex)
listIndex--;
}
if (_loadedTrackDesign && (_loadedTrackDesign->track_flags & TRACK_DESIGN_FLAG_SCENERY_UNAVAILABLE))
// Displays a message if the ride can't load, fix #4080
if (_loadedTrackDesign == nullptr)
{
context_show_error(STR_CANT_BUILD_PARK_ENTRANCE_HERE, STR_TRACK_LOAD_FAILED_ERROR);
return;
}
if (_loadedTrackDesign->track_flags & TRACK_DESIGN_FLAG_SCENERY_UNAVAILABLE)
{
gTrackDesignSceneryToggle = true;
}

View File

@ -35,7 +35,7 @@ struct TrackRepositoryItem
{
std::string Name;
std::string Path;
uint8_t RideType = 0;
uint8_t RideType = RIDE_TYPE_NULL;
std::string ObjectEntry;
uint32_t Flags = 0;
};