diff --git a/src/openrct2/ride/Track.cpp b/src/openrct2/ride/Track.cpp index 777277f1ed..e53d06dd63 100644 --- a/src/openrct2/ride/Track.cpp +++ b/src/openrct2/ride/Track.cpp @@ -900,9 +900,9 @@ bool track_remove_station_element(int32_t x, int32_t y, int32_t z, Direction dir if (stationElement != nullptr) { int32_t targetTrackType; - if (x == stationX1 && y == stationY1) + if ((x == stationX1 && y == stationY1) + || (x + CoordsDirectionDelta[direction].x == removeX && y + CoordsDirectionDelta[direction].y == removeY)) { - loc_6C4BF5:; auto stationIndex = ride_get_first_empty_station_start(ride); if (stationIndex == STATION_INDEX_NULL) { @@ -923,27 +923,19 @@ bool track_remove_station_element(int32_t x, int32_t y, int32_t z, Direction dir } else { - if (x + CoordsDirectionDelta[direction].x == removeX && y + CoordsDirectionDelta[direction].y == removeY) + if (x - CoordsDirectionDelta[direction].x == removeX && y - CoordsDirectionDelta[direction].y == removeY) { - goto loc_6C4BF5; + targetTrackType = TRACK_ELEM_BEGIN_STATION; } else { - if (x - CoordsDirectionDelta[direction].x == removeX - && y - CoordsDirectionDelta[direction].y == removeY) + if (x == stationX0 && y == stationY0) { targetTrackType = TRACK_ELEM_BEGIN_STATION; } else { - if (x == stationX0 && y == stationY0) - { - targetTrackType = TRACK_ELEM_BEGIN_STATION; - } - else - { - targetTrackType = TRACK_ELEM_MIDDLE_STATION; - } + targetTrackType = TRACK_ELEM_MIDDLE_STATION; } } }