diff --git a/src/openrct2/ride/ride.c b/src/openrct2/ride/ride.c index 3625755f9d..955efbb7a1 100644 --- a/src/openrct2/ride/ride.c +++ b/src/openrct2/ride/ride.c @@ -1334,7 +1334,7 @@ void ride_restore_provisional_track_piece() if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_TRACK) { sint32 x, y, z, direction, type, rideIndex, edxRS16; if (sub_6CA2DF(&type, &direction, &rideIndex, &edxRS16, &x, &y, &z, NULL)) { - sub_6C96C0(); + ride_construction_remove_ghosts(); } else { _currentTrackPrice = sub_6CA162(rideIndex, type, direction, edxRS16, x, y, z); window_ride_construction_update_active_elements(); @@ -1388,9 +1388,8 @@ void ride_remove_provisional_track_piece() * * rct2: 0x006C96C0 */ -void sub_6C96C0() +void ride_construction_remove_ghosts() { - if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_ENTRANCE_OR_EXIT) { ride_entrance_exit_remove_ghost(); _currentTrackSelectionFlags &= ~TRACK_SELECTION_FLAG_ENTRANCE_OR_EXIT; @@ -1438,7 +1437,7 @@ void ride_construction_invalidate_current_track() gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; map_invalidate_tile_full(_currentTrackBeginX, _currentTrackBeginY); } - sub_6C96C0(); + ride_construction_remove_ghosts(); break; } } diff --git a/src/openrct2/ride/ride.h b/src/openrct2/ride/ride.h index e041a781d5..fd5ba1b7cb 100644 --- a/src/openrct2/ride/ride.h +++ b/src/openrct2/ride/ride.h @@ -1106,7 +1106,7 @@ bool track_block_get_previous(sint32 x, sint32 y, rct_map_element *mapElement, t bool track_block_get_previous_from_zero(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint8 direction, track_begin_end *outTrackBeginEnd); void window_ride_construction_update_active_elements(); -void sub_6C96C0(); +void ride_construction_remove_ghosts(); money32 ride_entrance_exit_place_ghost(sint32 rideIndex, sint32 x, sint32 y, sint32 direction, sint32 placeType, sint32 stationNum); void ride_get_entrance_or_exit_position_from_screen_position(sint32 x, sint32 y, sint32 *outX, sint32 *outY, sint32 *outDirection); diff --git a/src/openrct2/windows/ride_construction.c b/src/openrct2/windows/ride_construction.c index ea70ec44f0..25fc4a357b 100644 --- a/src/openrct2/windows/ride_construction.c +++ b/src/openrct2/windows/ride_construction.c @@ -2757,7 +2757,7 @@ money32 sub_6CA162(sint32 rideIndex, sint32 trackType, sint32 trackDirection, si rct_ride *ride; money32 result; - sub_6C96C0(); + ride_construction_remove_ghosts(); ride = get_ride(rideIndex); if (ride->type == RIDE_TYPE_MAZE) { result = game_do_command(x, 105 | (4 << 8), y, rideIndex | (trackType << 8) | (edxRS16 << 16), GAME_COMMAND_SET_MAZE_TRACK, z, 0); @@ -2816,7 +2816,7 @@ void sub_6C94D8() case RIDE_CONSTRUCTION_STATE_BACK: if (!(_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_TRACK)) { if (sub_6CA2DF(&type, &direction, &rideIndex, &edxRS16, &x, &y, &z, NULL)) { - sub_6C96C0(); + ride_construction_remove_ghosts(); } else { _currentTrackPrice = sub_6CA162(rideIndex, type, direction, edxRS16, x, y, z); window_ride_construction_update_active_elements(); @@ -2859,7 +2859,7 @@ void sub_6C94D8() direction = _currentTrackPieceDirection & 3; type = _currentTrackPieceType; if (sub_6C683D(&x, &y, &z, direction, type, 0, NULL, _currentTrackSelectionFlags & TRACK_SELECTION_FLAG_ARROW ? 2 : 1)) { - sub_6C96C0(); + ride_construction_remove_ghosts(); _rideConstructionState = RIDE_CONSTRUCTION_STATE_0; } break; diff --git a/src/openrct2/world/entrance.cpp b/src/openrct2/world/entrance.cpp index e4d1e6dbc8..e2ee06afe4 100644 --- a/src/openrct2/world/entrance.cpp +++ b/src/openrct2/world/entrance.cpp @@ -734,7 +734,7 @@ extern "C" sint32 placeType, sint32 stationNum) { - sub_6C96C0(); + ride_construction_remove_ghosts(); money32 result = RideEntranceExitPlaceGhost(rideIndex, x, y, direction, placeType, stationNum); if (result != MONEY32_UNDEFINED)