1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Fix track design previews not passing flags down.

This commit is contained in:
Matt
2018-12-15 11:00:01 +01:00
parent 5a8b611b83
commit d1ee19efd4

View File

@@ -1881,7 +1881,8 @@ static money32 place_track_design(int16_t x, int16_t y, int16_t z, uint8_t flags
uint8_t rideIndex; uint8_t rideIndex;
uint8_t rideColour; uint8_t rideColour;
money32 createRideResult = ride_create_command(td6->type, entryIndex, GAME_COMMAND_FLAG_APPLY, &rideIndex, &rideColour); money32 createRideResult = ride_create_command(
td6->type, entryIndex, GAME_COMMAND_FLAG_APPLY | flags, &rideIndex, &rideColour);
if (createRideResult == MONEY32_UNDEFINED) if (createRideResult == MONEY32_UNDEFINED)
{ {
gGameCommandErrorTitle = STR_CANT_CREATE_NEW_RIDE_ATTRACTION; gGameCommandErrorTitle = STR_CANT_CREATE_NEW_RIDE_ATTRACTION;
@@ -1925,7 +1926,7 @@ static money32 place_track_design(int16_t x, int16_t y, int16_t z, uint8_t flags
if (cost == MONEY32_UNDEFINED || !(flags & GAME_COMMAND_FLAG_APPLY)) if (cost == MONEY32_UNDEFINED || !(flags & GAME_COMMAND_FLAG_APPLY))
{ {
rct_string_id error_reason = gGameCommandErrorText; rct_string_id error_reason = gGameCommandErrorText;
ride_action_modify(rideIndex, RIDE_MODIFY_DEMOLISH, GAME_COMMAND_FLAG_APPLY); ride_action_modify(rideIndex, RIDE_MODIFY_DEMOLISH, GAME_COMMAND_FLAG_APPLY | flags);
gGameCommandErrorText = error_reason; gGameCommandErrorText = error_reason;
gCommandExpenditureType = RCT_EXPENDITURE_TYPE_RIDE_CONSTRUCTION; gCommandExpenditureType = RCT_EXPENDITURE_TYPE_RIDE_CONSTRUCTION;
*outRideIndex = rideIndex; *outRideIndex = rideIndex;