From 7e67f0381ed693dff453d3cfb38420c674c2a948 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Fri, 11 Sep 2015 14:38:45 +0200 Subject: [PATCH] Extend build-in-pause-mode to entrances and exits, clear up some flags, fix ghost sticking in pause mode, fixes #1918 --- src/ride/ride.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ride/ride.c b/src/ride/ride.c index 55f2b4c06d..dbe9271617 100644 --- a/src/ride/ride.c +++ b/src/ride/ride.c @@ -1190,7 +1190,7 @@ void sub_6C96C0() _currentTrackSelectionFlags &= ~4; game_do_command( RCT2_GLOBAL(0x00F440BF, uint16), - 41, + (GAME_COMMAND_FLAG_5 | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_APPLY), RCT2_GLOBAL(0x00F440C1, uint16), _currentRideIndex, GAME_COMMAND_REMOVE_RIDE_ENTRANCE_OR_EXIT, @@ -1588,7 +1588,7 @@ static int ride_modify_entrance_or_exit(rct_map_element *mapElement, int x, int RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) &= ~2; } else { // Remove entrance / exit - game_do_command(x, 9, y, rideIndex, GAME_COMMAND_REMOVE_RIDE_ENTRANCE_OR_EXIT, bl, 0); + game_do_command(x, (GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_APPLY), y, rideIndex, GAME_COMMAND_REMOVE_RIDE_ENTRANCE_OR_EXIT, bl, 0); RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WIDGETINDEX, uint16) = entranceType == ENTRANCE_TYPE_RIDE_ENTRANCE ? 29 : 30; RCT2_GLOBAL(0x00F44191, uint8) = entranceType; } @@ -6515,7 +6515,7 @@ money32 place_ride_entrance_or_exit(sint16 x, sint16 y, sint16 z, uint8 directio return MONEY32_UNDEFINED; } - if (!(flags & GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED) && RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) != 0){ + if (!(flags & GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED) && RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) != 0 && !gConfigCheat.build_in_pause_mode){ RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CONSTRUCTION_NOT_POSSIBLE_WHILE_GAME_IS_PAUSED; return MONEY32_UNDEFINED; } @@ -6697,8 +6697,8 @@ void game_command_place_ride_entrance_or_exit(int *eax, int *ebx, int *ecx, int money32 remove_ride_entrance_or_exit(sint16 x, sint16 y, uint8 rideIndex, uint8 station_num, uint8 flags){ rct_ride* ride = GET_RIDE(rideIndex); - if (!(flags & (1 << 6))){ - if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) != 0){ + if (!(flags & GAME_COMMAND_FLAG_GHOST)){ + if (!(flags & GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED) && RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) != 0 && !gConfigCheat.build_in_pause_mode){ RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CONSTRUCTION_NOT_POSSIBLE_WHILE_GAME_IS_PAUSED; return MONEY32_UNDEFINED; }