1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

Fix #6420: Demolishing rides refunds twice as much as the ride costs to build

This commit is contained in:
Duncan
2017-10-11 06:58:49 +01:00
committed by Michael Steenbeek
parent e01cd0fd40
commit f97068d0b6
2 changed files with 6 additions and 6 deletions

View File

@@ -51,7 +51,7 @@ typedef struct GameAction GameAction;
// This define specifies which version of network stream current build uses.
// It is used for making sure only compatible builds get connected, even within
// single OpenRCT2 version.
#define NETWORK_STREAM_VERSION "12"
#define NETWORK_STREAM_VERSION "13"
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
#ifdef __cplusplus

View File

@@ -5480,7 +5480,7 @@ sint32 ride_get_refund_price(sint32 ride_id)
if (type != TRACK_ELEM_INVERTED_90_DEG_UP_TO_FLAT_QUARTER_LOOP){
money32 removePrice = game_do_command(
x,
GAME_COMMAND_FLAG_APPLY | (rotation << 8),
GAME_COMMAND_FLAG_5 | GAME_COMMAND_FLAG_APPLY | (rotation << 8),
y,
type | (map_element_get_track_sequence(it.element) << 8),
GAME_COMMAND_REMOVE_TRACK,
@@ -5498,7 +5498,7 @@ sint32 ride_get_refund_price(sint32 ride_id)
// Using GAME_COMMAND_FLAG_2 for below commands as a HACK to stop fences from being removed
refundPrice += game_do_command(
x,
GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_2 | (0 << 8),
GAME_COMMAND_FLAG_5 | GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_2 | (0 << 8),
y,
ride_id | (2 << 8),
GAME_COMMAND_SET_MAZE_TRACK,
@@ -5507,7 +5507,7 @@ sint32 ride_get_refund_price(sint32 ride_id)
refundPrice += game_do_command(
x,
GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_2 | (1 << 8),
GAME_COMMAND_FLAG_5 | GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_2 | (1 << 8),
y + 16,
ride_id | (2 << 8),
GAME_COMMAND_SET_MAZE_TRACK,
@@ -5516,7 +5516,7 @@ sint32 ride_get_refund_price(sint32 ride_id)
refundPrice += game_do_command(
x + 16,
GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_2 | (2 << 8),
GAME_COMMAND_FLAG_5 | GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_2 | (2 << 8),
y + 16,
ride_id | (2 << 8),
GAME_COMMAND_SET_MAZE_TRACK,
@@ -5525,7 +5525,7 @@ sint32 ride_get_refund_price(sint32 ride_id)
refundPrice += game_do_command(
x + 16,
GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_2 | (3 << 8),
GAME_COMMAND_FLAG_5 | GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_2 | (3 << 8),
y,
ride_id | (2 << 8),
GAME_COMMAND_SET_MAZE_TRACK,