mirror of https://github.com/OpenRCT2/OpenRCT2.git
This commit is contained in:
parent
4e60f0db42
commit
8c7dfd3097
|
@ -5157,6 +5157,15 @@ int ride_is_valid_for_open(int rideIndex, int goingToBeOpen, int isApplying)
|
||||||
|
|
||||||
ride = get_ride(rideIndex);
|
ride = get_ride(rideIndex);
|
||||||
|
|
||||||
|
// Check to see if construction tool in use. If it is close the construction window
|
||||||
|
// to set the track to its final state and clean up ghosts.
|
||||||
|
// We can't just call close as it would cause a stack overflow during shop creation
|
||||||
|
// with auto open on.
|
||||||
|
if (WC_RIDE_CONSTRUCTION == RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWCLASS, rct_windowclass) &&
|
||||||
|
rideIndex == RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWNUMBER, rct_windownumber) &&
|
||||||
|
(gInputFlags & INPUT_FLAG_TOOL_ACTIVE))
|
||||||
|
window_close_by_number(WC_RIDE_CONSTRUCTION, rideIndex);
|
||||||
|
|
||||||
stationIndex = ride_mode_check_station_present(ride);
|
stationIndex = ride_mode_check_station_present(ride);
|
||||||
if (stationIndex == -1)return 0;
|
if (stationIndex == -1)return 0;
|
||||||
|
|
||||||
|
|
|
@ -6597,9 +6597,6 @@ void sub_6DBF3E(rct_vehicle *vehicle)
|
||||||
trackType,
|
trackType,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
if (mapElement == NULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (RCT2_GLOBAL(0x00F64E1C, uint32) == 0xFFFFFFFF) {
|
if (RCT2_GLOBAL(0x00F64E1C, uint32) == 0xFFFFFFFF) {
|
||||||
RCT2_GLOBAL(0x00F64E1C, uint32) = (mapElement->properties.track.sequence >> 4) & 7;
|
RCT2_GLOBAL(0x00F64E1C, uint32) = (mapElement->properties.track.sequence >> 4) & 7;
|
||||||
}
|
}
|
||||||
|
@ -6666,9 +6663,6 @@ bool vehicle_update_track_motion_forwards_get_new_track(rct_vehicle *vehicle, ui
|
||||||
trackType,
|
trackType,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
if (mapElement == NULL) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (trackType == TRACK_ELEM_CABLE_LIFT_HILL && vehicle == RCT2_GLOBAL(0x00F64E04, rct_vehicle*)) {
|
if (trackType == TRACK_ELEM_CABLE_LIFT_HILL && vehicle == RCT2_GLOBAL(0x00F64E04, rct_vehicle*)) {
|
||||||
RCT2_GLOBAL(0x00F64E18, uint32) |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_11;
|
RCT2_GLOBAL(0x00F64E18, uint32) |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_11;
|
||||||
}
|
}
|
||||||
|
|
|
@ -592,6 +592,7 @@ static void window_ride_construction_close(rct_window *w)
|
||||||
uint8 rideIndex = _currentRideIndex;
|
uint8 rideIndex = _currentRideIndex;
|
||||||
if (ride_try_get_origin_element(rideIndex, NULL)) {
|
if (ride_try_get_origin_element(rideIndex, NULL)) {
|
||||||
rct_ride *ride = get_ride(rideIndex);
|
rct_ride *ride = get_ride(rideIndex);
|
||||||
|
// Auto open shops if required.
|
||||||
if (ride->mode == RIDE_MODE_SHOP_STALL && gConfigGeneral.auto_open_shops) {
|
if (ride->mode == RIDE_MODE_SHOP_STALL && gConfigGeneral.auto_open_shops) {
|
||||||
ride_set_status(rideIndex, RIDE_STATUS_OPEN);
|
ride_set_status(rideIndex, RIDE_STATUS_OPEN);
|
||||||
}
|
}
|
||||||
|
@ -1928,12 +1929,6 @@ static void window_ride_construction_exit_click(rct_window *w)
|
||||||
*/
|
*/
|
||||||
static void window_ride_construction_update(rct_window *w)
|
static void window_ride_construction_update(rct_window *w)
|
||||||
{
|
{
|
||||||
rct_ride *ride = get_ride(_currentRideIndex);
|
|
||||||
if (ride == NULL || ride->status != RIDE_STATUS_CLOSED || _deferClose) {
|
|
||||||
window_close(w);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (_currentTrackCurve) {
|
switch (_currentTrackCurve) {
|
||||||
case 429:
|
case 429:
|
||||||
case 376:
|
case 376:
|
||||||
|
|
Loading…
Reference in New Issue