diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 4c7c4a01b7c8..bd3d18761c05 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -26,6 +26,7 @@ - Change: [#16077] When importing SV6 files, the RCT1 land types are only added when they were actually used. - Change: [#16424] Following an entity in the title sequence no longer toggles underground view when it's underground. - Change: [#16493] Boat Hire and Submarine Ride support costs now match their visual appearance. +- Fix: [#11752] Track pieces with fractional cost are too cheap to build. - Fix: [#13336] Can no longer place Bumble Bee track design (reverts #12707). - Fix: [#14155] Map Generator sometimes places non-tree objects as trees. - Fix: [#14674] Recent Messages only shows first few notifications. diff --git a/src/openrct2/actions/MazePlaceTrackAction.cpp b/src/openrct2/actions/MazePlaceTrackAction.cpp index 11e1bee7b450..cdf34aaad2bc 100644 --- a/src/openrct2/actions/MazePlaceTrackAction.cpp +++ b/src/openrct2/actions/MazePlaceTrackAction.cpp @@ -119,7 +119,7 @@ GameActions::Result MazePlaceTrackAction::Query() const const auto& ted = GetTrackElementDescriptor(TrackElemType::Maze); money32 price = (((ride->GetRideTypeDescriptor().BuildCosts.TrackPrice * ted.Price) >> 16)); - res.Cost = canBuild.Cost + price / 2 * 10; + res.Cost = ((canBuild.Cost + price) / 2) * 10; return res; } @@ -161,7 +161,7 @@ GameActions::Result MazePlaceTrackAction::Execute() const const auto& ted = GetTrackElementDescriptor(TrackElemType::Maze); money32 price = (((ride->GetRideTypeDescriptor().BuildCosts.TrackPrice * ted.Price) >> 16)); - res.Cost = canBuild.Cost + price / 2 * 10; + res.Cost = ((canBuild.Cost + price) / 2) * 10; auto startLoc = _loc.ToTileStart(); diff --git a/src/openrct2/actions/TrackPlaceAction.cpp b/src/openrct2/actions/TrackPlaceAction.cpp index cc859100f901..1e50240a9500 100644 --- a/src/openrct2/actions/TrackPlaceAction.cpp +++ b/src/openrct2/actions/TrackPlaceAction.cpp @@ -393,14 +393,14 @@ GameActions::Result TrackPlaceAction::Query() const supportHeight = (10 * COORDS_Z_STEP); } - cost += ((supportHeight / (2 * COORDS_Z_STEP)) * ride->GetRideTypeDescriptor().BuildCosts.SupportPrice) * 5; + cost += ((supportHeight / (2 * COORDS_Z_STEP)) * ride->GetRideTypeDescriptor().BuildCosts.SupportPrice); } money32 price = ride->GetRideTypeDescriptor().BuildCosts.TrackPrice; price *= ted.Price; price >>= 16; - res.Cost = cost + ((price / 2) * 10); + res.Cost = ((cost + price) / 2) * 10; res.SetData(std::move(resultData)); return res; @@ -522,7 +522,7 @@ GameActions::Result TrackPlaceAction::Execute() const supportHeight = (10 * COORDS_Z_STEP); } - cost += ((supportHeight / (2 * COORDS_Z_STEP)) * ride->GetRideTypeDescriptor().BuildCosts.SupportPrice) * 5; + cost += (supportHeight / (2 * COORDS_Z_STEP)) * ride->GetRideTypeDescriptor().BuildCosts.SupportPrice; if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST)) { @@ -697,7 +697,7 @@ GameActions::Result TrackPlaceAction::Execute() const price *= ted.Price; price >>= 16; - res.Cost = cost + ((price / 2) * 10); + res.Cost = ((cost + price) / 2) * 10; res.SetData(std::move(resultData)); return res; diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index 63ad89d4ec09..51a9724ac117 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -42,7 +42,7 @@ // This string 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 "17" +#define NETWORK_STREAM_VERSION "18" #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION static Peep* _pickup_peep = nullptr;