Fix #7828: Copied entrances and exits stay when demolishing ride (#7932)

This commit is contained in:
Christian Schubert 2018-09-23 17:38:59 +02:00 committed by Hielke Morsink
parent 3243b1788a
commit 16936d4ea1
3 changed files with 20 additions and 1 deletions

View File

@ -114,6 +114,7 @@ The following people are not part of the development team, but have been contrib
* Andy Ford (AndyTWF)
* Matthew Beaudin (mattbeaudin)
* Øystein Dale (oystedal)
* Christian Schubert (Osmodium)
## Toolchain
* (Balletie) - macOS

View File

@ -3,6 +3,7 @@
- Feature: [#7956, #7964] Add sprite font glyphs for Hungarian and some Czech letters.
- Feature: [#7971] Toolbox option to open custom content folder.
- Feature: [#7980] Allow data path for RCT1 to be specified by a command line argument.
- Fix: [#7828] Copied entrances and exits stay when demolishing ride.
- Fix: [#7954] Key validation fails on Windows due to non-ASCII user / player name.
- Fix: [#7975] Inspection flag not cleared for rides which are set to never be inspected (Original bug).
- Improved: [#2940] Allow mouse-dragging to set patrol area (Singleplayer only).

View File

@ -284,7 +284,24 @@ private:
tile_element_iterator_begin(&it);
while (tile_element_iterator_next(&it))
{
if (it.element->GetType() != TILE_ELEMENT_TYPE_TRACK)
uint8_t tile_type = it.element->GetType();
if (tile_type == TILE_ELEMENT_TYPE_ENTRANCE)
{
uint8_t type = track_element_get_type(it.element);
if (type == ENTRANCE_TYPE_PARK_ENTRANCE)
continue;
if (track_element_get_ride_index(it.element) == _rideIndex)
{
tile_element_remove(it.element);
tile_element_iterator_restart_for_tile(&it);
}
continue;
}
if (tile_type != TILE_ELEMENT_TYPE_TRACK)
continue;
if (track_element_get_ride_index(it.element) != _rideIndex)